excerpt from Debug vs. Release by Joseph M. Newcomer (see link below):
Its definately worth reading in its entirety, not just the memcpy section.

It has been reported to me that memcpy might be implemented differently between the Debug mode and the Release mode such that a memcpy which had no problem in Debug mode will fail completely in the Release mode.

I agree!

Good luck finding any official documentation on this.

REF:
Debug vs. Release by Joseph M. Newcomer


C/C++ · Debug · debug · memcpy · memmove · release