Skip to content

Revert "Call OpenSSL cleanup before safeExit to fix LeakSanitizer false positives" - #98354

Merged
alexey-milovidov merged 1 commit into
masterfrom
revert-98296-fix-openssl-lsan-false-positive
Mar 1, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
revert-98296-fix-openssl-lsan-false-positive

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Feb 28, 2026 •

Copy link
Copy Markdown
Member

Reverts #98296

Version info

  • Merged into: 26.3.1.173

@clickhouse-gh

clickhouse-gh Bot commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [cc6a297]

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Feb 28, 2026
alexey-milovidov added a commit that referenced this pull request Feb 28, 2026
…anitizer false positives

`safeExit` calls `_exit`, which bypasses static destructors and atexit
handlers. ASan intercepts `_exit` and runs LSan, which then reports
memory from libraries (e.g., OpenSSL global state) as leaked because
their cleanup routines never ran.

By calling `__lsan_do_leak_check` before `_exit`, the leak check runs
while all memory is still reachable through global pointers, and the
subsequent at-exit check is disabled. This prevents false positives
without requiring per-library cleanup calls.

Supersedes #98296 (reverted in #98354).
#98354

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@alexey-milovidov
alexey-milovidov merged commit 3e0cb06 into master Mar 1, 2026
47 of 123 checks passed
@alexey-milovidov alexey-milovidov self-assigned this Mar 1, 2026
@alexey-milovidov
alexey-milovidov deleted the revert-98296-fix-openssl-lsan-false-positive branch March 1, 2026 00:31
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 1, 2026
alexey-milovidov added a commit that referenced this pull request Mar 1, 2026
…an-false-positive

Revert "Call OpenSSL cleanup before safeExit to fix LeakSanitizer false positives"
@CheSema CheSema added the post-approved Approved, but after the PR is merged. label Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

post-approved Approved, but after the PR is merged. pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants