12-25-2025, 03:00 AM
I'm working on a C++ application that's been running fine for months, but after a recent update to a third-party library, I'm now getting a sporadic segmentation fault that only occurs under heavy load. The core dump points to a memory address inside the new library, but I can't tell if it's a bug in their code or if my application is somehow corrupting the heap before the call. What's the best strategy to isolate the root cause? Should I focus on using Valgrind or AddressSanitizer, and are there specific techniques for debugging these kinds of intermittent faults in a multi-threaded environment where the stack trace isn't always reliable?