Debugging a Heisenbug. Among other efforts to probe it, making a small change to an unrelated function makes it go away. Years ago, I'd have left it at that... but now I'm not going to sleep until I know what's going on...
-
Show this thread
-
In case anyone's wondering, the undefined behaviour turned out to be caused by using memcpy on overlapping regions. I found this after sleeping :).
6 replies 0 retweets 61 likesShow this thread -
-
-
Replying to @edwinbrady
I wonder if your memcpy() was inlined and Valgrind missed it. Detecting overlapping memcpy has been in Valgrind for years.
1 reply 0 retweets 0 likes -
Replying to @neitherspanish
When I spotted it, one of my first thoughts was to wonder why valgrind missed it. It's possible that it's related to the fact that the error only happened under -O2.
1 reply 0 retweets 0 likes
I suppose the lesson to learn, when I encounter something like this again, is to run valgrind on the unoptimised code too! Everybody other than me probably knows this already.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.