bryancall opened a new pull request, #12754: URL: https://github.com/apache/trafficserver/pull/12754
## Summary - Add debug logging, validation assertions, and memory poisoning to help track down intermittent heap corruption issues during cache cleanup - Helps diagnose issues like `free(): corrupted unsorted chunks` that can occur intermittently during cache test cleanup (seen in CI build #47769) ## Changes - Add `Dbg()` logging with pointer address, size, and allocation type (enable with `T:cache_free` debug tag) - Add assertions to validate size is reasonable before freeing (crashes with cleaner stack trace if corrupted) - Add memory poisoning (`0xDE` pattern) in DEBUG builds before free to detect use-after-free - Reset `raw_dir_size` to 0 after freeing ## Test plan - [x] Build and run cache unit tests - [x] Verified with ASAN enabled -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
