Diagnosing Heap Corruption in C with AddressSanitizer: Symptoms, Checks, and Fixes
Intermittent crashes that move when you add a printf are heap corruption, not logic bugs. This guide shows how to catch the real culprit with AddressSanitizer in GCC and Clang: ordered checks, fixes matched to each report type, and when to escalate to Valgrind, UBSan, or TSan.