Skip to content

fix(test): suppress OpenSSL builtin-compressions LSan leak on Node 26#359

Closed
szegedi wants to merge 1 commit into
mainfrom
fix-asan-lsan-ossl-compressions
Closed

fix(test): suppress OpenSSL builtin-compressions LSan leak on Node 26#359
szegedi wants to merge 1 commit into
mainfrom
fix-asan-lsan-ossl-compressions

Conversation

@szegedi

@szegedi szegedi commented Jun 26, 2026

Copy link
Copy Markdown

What

Adds an LSan suppression for the OpenSSL builtin-compressions one-time-init leak that is failing the ASAN job on Node.js 26.

Why

The ASAN (26) job fails with:

==XXXX==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #1 CRYPTO_malloc
    #2 ossl_load_builtin_compressions
    #3 context_init
    ...
    #12 OPENSSL_init_crypto
    #13 node::InitializeOncePerProcessInternal(...)

Node 26's OpenSSL populates a global builtin-compressions list during OPENSSL_init_crypto that is never freed at process exit. This is the same class of benign, one-time process-init leak we already suppress via leak:CRYPTO_zalloc — but this path allocates via CRYPTO_malloc and so isn't matched by the existing rule.

How

Suppress the specific ossl_load_builtin_compressions frame rather than broadening to CRYPTO_malloc. CRYPTO_malloc is OpenSSL's general-purpose allocator used throughout, so suppressing it would risk masking genuine leaks in crypto code paths; the ossl_load_builtin_compressions frame pinpoints exactly this init leak.

🤖 Generated with Claude Code

Node 26's OpenSSL populates a global builtin-compressions list during
OPENSSL_init_crypto (ossl_load_builtin_compressions) that is never freed
at process exit, causing the ASAN job to fail with a 24-byte leak report.

This is the same class of benign one-time process-init leak we already
suppress via CRYPTO_zalloc, but this path allocates via CRYPTO_malloc and
so slips through. Suppress the specific ossl_load_builtin_compressions
frame rather than broadening to CRYPTO_malloc, which is OpenSSL's general
allocator and could mask genuine leaks in crypto code paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Jun 26, 2026

Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 3 Pipeline jobs failed

Build | build / alpine-test-26   View in Datadog   GitHub Actions

Build | build-successful   View in Datadog   GitHub Actions

Pull Request Labels | label   View in Datadog   GitHub Actions

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: add14b6 | Docs | Datadog PR Page | Give us feedback!

@github-actions

Copy link
Copy Markdown

Overall package size

Self size: 2.19 MB
Deduped: 2.89 MB
No deduping: 2.89 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | pprof-format | 2.2.2 | 500.53 kB | 500.53 kB | | source-map | 0.7.6 | 185.63 kB | 185.63 kB | | node-gyp-build | 4.8.4 | 13.86 kB | 13.86 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@szegedi szegedi added the semver-patch Bug or security fixes, mainly label Jun 26, 2026
@szegedi szegedi enabled auto-merge (squash) June 26, 2026 13:31
@szegedi

szegedi commented Jun 26, 2026

Copy link
Copy Markdown
Author

Folded into #360 (cherry-picked as a separate commit there). The wall-profiler UAF fix and this LSan suppression each block the other's CI from going green, so they need to land together.

@szegedi szegedi closed this Jun 26, 2026
auto-merge was automatically disabled June 26, 2026 13:38

Pull request was closed

@szegedi szegedi deleted the fix-asan-lsan-ossl-compressions branch June 26, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-patch Bug or security fixes, mainly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant