3 ms·
Oh man this brings back memories, and is the exact same approach I used a couple of decades ago — there was some undefined behaviour in some code, and it ended
by stingraycharles 4y ago
Oh man this brings back memories, and is the exact same approach I used a couple of decades ago — there was some undefined behaviour in some code, and it ended up being nearly impossible to reproduce when using valgrind.
Using the approach you described is extremely effective and low-overhead, and allowed me to actually reproduce the issue (I think in the end it was due some async / race condition issue, because I was using “if map[key]” in a place where I shouldn’t, which actually inserts the key if it’s missing (and thus mutates the map).
Fun times.