c++ - Why does Debug build fails whereas Release build succeed? -


i went through many topics asking "why release build fail , not debug?", i'm across situation it's reverse. here release build works fine debug mode build breaks. possible reasons or situations can happen? reply appreciated. in advance.

one of our friend gave direction towards memory freeing issue..

this same thing i'm facing... when build in release mode build successfully, when try build in debug mode fails/breaks @ point there statement freeing allocated memory..

code like: check if buffer null, , free if it's not null...

if(buffer){ free(buffer) }

when keep breakpoint on line (inside if loop) , check value in debug mode, appears "bad pointer".(0x000000)

but question remains why went inside of if-loop though buffer has value 0x000000 ?

i don't know details environment, debug environments take steps trigger bugs (e.g. filling freed memory invalid data), whereas release build not, giving more chances lucky.

the problem luck tends run out when move test data real environment....


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -