Clean up stale LSAN suppression entries#13029
Open
bryancall wants to merge 6 commits intoapache:masterfrom
Open
Clean up stale LSAN suppression entries#13029bryancall wants to merge 6 commits intoapache:masterfrom
bryancall wants to merge 6 commits intoapache:masterfrom
Conversation
Add missing HTTPHdr::destroy() calls for hdr and new_hdr on early return paths. marshal_hdr is intentionally not destroyed because it holds a reference to a stack-allocated TestRefCountObj.
Remove 5 entries for code that no longer exists: - RegressionTest_SDK_API_TSHttpConnectIntercept (removed) - RegressionTest_SDK_API_TSHttpConnectServerIntercept (removed) - make_log_host (removed with Lua support) - RegressionTest_Cache_vol (converted to Catch2) - RegressionTest_Hdrs (converted to Catch2)
Remove 5 entries for obsolete libraries: - libcrypto.so.1.1: OpenSSL 1.1 specific, test cleanup fixed - CRYPTO_malloc/CRYPTO_realloc: OpenSSL 1.0.2 (minimum is 1.1.1) - ConsCell: symbol no longer exists in codebase - pcre_jit_stack_alloc: PCRE replaced with PCRE2 Keep test_http_hdr_print_and_copy_aux suppression with updated comment explaining why marshal_hdr is intentionally not destroyed.
Contributor
There was a problem hiding this comment.
Pull request overview
Cleans up leak-sanitizer suppression lists by removing entries for deleted/converted tests and tightening unit-test leak behavior by fixing early-return cleanup in test_Hdrs.
Changes:
- Fix early-return
HTTPHdrcleanup intest_http_hdr_copy_over_auxandtest_http_hdr_print_and_copy_auxto eliminate real leaks. - Remove stale/obsolete leak suppression entries from
ci/asan_leak_suppression/regression.txtandci/asan_leak_suppression/unit_tests.txt. - Document the remaining unit-test suppression for
test_http_hdr_print_and_copy_aux.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/proxy/hdrs/unit_tests/test_Hdrs.cc |
Adds missing destroy() calls on error paths to prevent HTTPHdr heap leaks. |
ci/asan_leak_suppression/unit_tests.txt |
Drops obsolete suppressions and keeps a single, documented suppression for test_http_hdr_print_and_copy_aux. |
ci/asan_leak_suppression/regression.txt |
Removes suppression entries for regression tests/symbols no longer present in the tree. |
masaori335
reviewed
Mar 30, 2026
masaori335
previously approved these changes
Mar 30, 2026
Replace manual destroy() calls on every error path with ts::PostScript scope guards. HdrHeapSDKHandle::destroy() is idempotent (checks m_heap before acting), so the mid-function destroy/re-create cycle in test_http_hdr_print_and_copy_aux is safe alongside the guard.
Now that PostScript handles cleanup, replace goto with if-not-error chaining for the comparison steps.
masaori335
approved these changes
Mar 31, 2026
Contributor
masaori335
left a comment
There was a problem hiding this comment.
Thank you, it's much cleaner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HTTPHdrmemory leaks intest_http_hdr_print_and_copy_auxon early return pathsci/asan_leak_suppression/regression.txt(tests deleted or converted)ci/asan_leak_suppression/unit_tests.txt(OpenSSL 1.0.2, PCRE, already-fixed leak)Test plan
ENABLE_ASAN=ONand ran unit tests —test_Hdrspasses clean