A collection of debugging stories
github.com
github.com
The a-ha moment when you've figured one out is interesting. It's always a mixture of pleasure at having discovered a complex causal chain and horror at having written it.
http://www.amazon.com/The-Bug-Novel-Ellen-Ullman/dp/12500024...
http://www.amazon.com/Debugging-Indispensable-Software-Hardw...
Maybe one could ask the authors if they could donate their debugging articles to a cc licensed repository so the articles themselves could be hosted instead of linking? That would be very nice I think.
This quote is amazing lol
[1] http://www.gamasutra.com/blogs/DaveBaggett/20131031/203788/M...
x = (Item*)malloc(sizeof(Item));
memset(x->name, 0, 12);
strcpy(x->name, name);
x->flag = flag;
So the bits after name are now significant in compares but expected to be zero because of memset. Well the optimizer would effectively remove the memset in release builds due to the strcpy so the code worked most of the time in release but would occasionally break because the bytes after the null terminated name could be anything and would only come into play when name was the same for 2 items.A close equivalent is reading Derek Lowe's "things i won't work with" articles.
http://blogs.sciencemag.org/pipeline/archives/category/thing...
http://nanxiao.me/en/an-experience-of-fixing-a-memory-corrup...
is really dumb. The moral is that you don't use global variables that are accessed by multiple threads (unless you're very careful). That's C programming 101.