Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The core problem is some compilers initialising memory to zero in Debug mode, masking behaviour of unitialised data, since in most cases zero is a legit value. In Release mode, this zeroing doesn’t happen.

Devs need to be aware that the following C++ initisliser exists which zeros data structures for you:

MyStruct s = { };



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: