News for hackers. Stuff that matters.
Re:When you see a Heisenbug in C, change your compiler's opt... by infogulch on Saturday March 01, 2014 @08:40PM (#7327244)
That has happened to me as well. There's a bug until I add a printf or enable debugging, or (paradoxically) go from -O0 to -O2. What's going on here? Is there some specific class of UB that I'm invoking to get this infuriating bug?
Re:When you see a Heisenbug in C, change your compiler's opt... by cpncrunch on Sunday March 02, 2014 @12:30AM (#7327848)
I think it's usually just accessing out of bounds memory / uninitialized read, and -g/-O just happens to change the memory layout enough to cause/prevent the crash.