Two concerns I can think of:
-
Debug builds often add padding to buffers. That’s why sometimes you get programs that seem to work in debug but crash in release. Seem is the operative word here, as buffer overflows are just an accident waiting to happen.
-
Strange things happen in debug builds. I once worked on a long running application that would crash every twenty days or so. It turns out that in the C runtime a counter (used to aid debugging) was being incremented each time a malloc/free was performed. If the counter happened to overflow – kaboom! For this reason alone I would never recommend anyone deploy debug binaries – you just never know what surprises might be waiting for your customer.