How can I detect memory overwrites on dynamically allocated (mallocd) memory?
A crash can happen because memory allocated using malloc() or its variants is being corrupted by code that writes past the end (or before the beginning) of the memory that’s returned, corrupting malloc’s internal pointers or adjacent data. The predefined “memcheck” probe detects this by putting a “fence” at the end of allocated memory, and checking the fence is intact when the memory is freed: see Q15.18.