by PatKelly · 11y ago · 0 comments
Then you can break in a debugger, and do some tricks, explained in this page: https://code.google.com/p/address-sanitizer/wiki/AddressSani....
This will also detect any memory trashing or the like, while being quite fast (compared to valgrind, of course). Then if things are really weird, you can use valgrind.
It also has an address sanitizer that checks for out of bounds errors. I have found both to be enormously useful.