-
Notifications
You must be signed in to change notification settings - Fork 5k
test: make the ported Node suite run leak-clean under the ASAN runner, and fix the teardown UAFs and leaks it surfaces #31833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
8c373a0
Make the full Node parallel/sequential suite pass leak-clean under th…
cirospaciari 2aec5c2
[autofix.ci] apply automated fixes
autofix-ci[bot] ab7a099
Merge branch 'main' into claude/node-suite-asan-leak-clean
robobun 9b7a19b
boringssl: free SAN stacks with GENERAL_NAMES_free
alii 87ac1ab
url: return OwnedString from WTF::URL getters
alii 671eff8
child_process: read normalized stdio length; add explicit takeStdio
alii 8756b01
vm: consolidate pre-teardown Strong-handle release; call from Worker …
alii b340e97
test: narrow leaksan suppressions; scope FLAKY entry to ASAN; runner …
alii 1b7f0fb
Merge branch 'main' into claude/node-suite-asan-leak-clean
alii 89c5a16
Merge branch 'main' into claude/node-suite-asan-leak-clean
alii c9aaff8
[autofix.ci] apply automated fixes
autofix-ci[bot] 3df81f7
Merge branch 'main' into claude/node-suite-asan-leak-clean
alii d538d79
runner: keep NODE_TEST_DIR unset on Windows
alii 10af51d
Merge remote-tracking branch 'origin/main' into HEAD
alii f04711d
verify skill: use bun bd for probes to match CLAUDE.md build-then-exe…
alii 151cf3c
Merge remote-tracking branch 'origin/main' into claude/node-suite-asa…
cirospaciari a0d36f9
test: unquarantine test-worker-terminate-http2-respond-with-file
cirospaciari e06fa0a
vm: release Strong handles in destroy() too; strengthen child_process…
cirospaciari f7bd302
test: drop the Bun.main teardown smoke test
cirospaciari b16da77
Merge origin/main into claude/node-suite-asan-leak-clean
cirospaciari a9612fb
Merge remote-tracking branch 'origin/main' into claude/node-suite-asa…
robobun 6686a7f
trim comments to <=3 lines, cite spec/node source
robobun 703ab06
test: await stream finished() instead of asserting readableEnded at exit
robobun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2967,6 +2967,15 @@ | |
| const sk = arg_sk; | ||
| sk_free(@as([*c]_STACK, @ptrCast(@alignCast(sk)))); | ||
| } | ||
| pub extern fn GENERAL_NAME_free(name: ?*GENERAL_NAME) void; | ||
| /// Element destructor for `sk_GENERAL_NAME_pop_free`: frees one GENERAL_NAME | ||
| /// and its nested ASN1 values. The parameter is spelled as the erased stack | ||
| /// alias to match `stack_GENERAL_NAME_free_func`, but the pointer is a stack | ||
| /// *element* (`GENERAL_NAME*`). Passing the container free | ||
| /// (`sk_GENERAL_NAME_free`) there instead leaks every nested ASN1_STRING. | ||
| pub fn sk_GENERAL_NAME_element_free(name: ?*struct_stack_st_GENERAL_NAME) callconv(.c) void { | ||
| GENERAL_NAME_free(@as(?*GENERAL_NAME, @ptrCast(name))); | ||
| } | ||
|
Check failure on line 2978 in src/boringssl_sys/boringssl.zig
|
||
| pub const stack_GENERAL_NAME_free_func = ?*const fn (?*struct_stack_st_GENERAL_NAME) callconv(.c) void; | ||
|
|
||
| pub fn sk_GENERAL_NAME_call_free_func(arg_free_func: stack_free_func, arg_ptr: ?*anyopaque) callconv(.c) void { | ||
|
|
||
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ leak:JSC::ScriptExecutable::newCodeBlockFor | |
| leak:JSC::Parser<JSC::Lexer<unsigned char>>::parseFunctionExpression | ||
| leak:JSC::Parser<JSC::Lexer<unsigned char>>::parsePrimaryExpression | ||
| leak:JSC::Parser<JSC::Lexer<unsigned char>>::parseStatement | ||
| leak:JSC::Parser<JSC::Lexer<unsigned char>>::parseImportDeclaration | ||
| leak:JSCInitialize | ||
| leak:getaddrinfo_send_reply | ||
| leak:start_wqthread | ||
|
|
@@ -121,3 +122,52 @@ leak:WebCore::jsSQLStatementOpenStatementFunction | |
| # is called before firing (WaiterListManager::clearTimer on notify/unregister), | ||
| # the DispatchTimer and its Bun-side WTFTimer Box leak. JSC-owned ref-cycle. | ||
| leak:WTF::RunLoop::dispatchAfter | ||
| leak:WTF::ParkingLot::parkConditionallyImpl | ||
| # Parser-arena identifiers pinned in the atom table at VM-destroy exit — | ||
| # covers all JSC::Parser parse productions (same family as the parse* entries above). | ||
| leak:JSC::IdentifierArena::makeIdentifier | ||
| # Live-thread TLS at exit: RunLoop holder of the vm watchdog/aux threads (same class as ParkingLot above). | ||
| leak:WTF::RunLoop::currentSingleton | ||
| # ASCIILiteral StringImpl wrapper for internal module names; pinned for process lifetime. | ||
| leak:Bun::InternalModuleRegistry::createInternalModuleById | ||
| # macOS libdispatch/XPC continuation cached inside dns_configuration_free while | ||
| # c-ares reads the system resolver config — OS-internal, not reachable by us. | ||
| leak:ares_init_sysconfig_macos | ||
| # FSEvents watcher thread (std::thread spawn block) still running at exit. | ||
| leak:FSEventsLoop | ||
| # Apple CoreAnalytics XPC telemetry triggered inside SecTrustCopyAnchorCertificates / | ||
| # system CA reads — OS-internal dispatch continuation. | ||
| leak:CoreAnalytics | ||
| # ASCIILiteral StringImpl wrapper created while formatting a stack frame's source | ||
| # URL on the exit path; same class as the InternalModuleRegistry entry above. | ||
| leak:Zig::sourceURL | ||
| # Apple Security.framework keychain internals reached from our run_once system | ||
| # root-CA load — cached for process lifetime by design. | ||
| leak:us_get_root_system_cert_instances | ||
| # JSC structure-heap bookkeeping (BitVector in StructureMemoryManager); grows | ||
| # once per structure block and lives for the VM's lifetime. | ||
| leak:JSC::StructureMemoryManager::tryMallocStructureBlock | ||
| # libsystem_info per-thread user-info cache (getpwuid via CFPreferences inside | ||
| # Security.framework) — OS-internal thread-local storage. | ||
| leak:LI_get_thread_info | ||
| # backtrace_symbols() buffer malloc'd inside debug-only stack-trace dumps | ||
| # (fd-UAF warning path); diagnostics memory, never freed by design. | ||
| leak:backtrace_symbols | ||
| # Per-VM JSON atom cache entry pinned in the atom table at VM-destroy exit | ||
| # (same family as IdentifierArena::makeIdentifier above). | ||
| leak:JSC::JSONAtomStringCache | ||
| # Inspector/debugger server thread (bun_jsc::debugger::Debugger::create) still | ||
| # parked at exit — live-thread allocation. Matches the Rust v0-mangled symbol. | ||
| leak:bun_jsc8debugger | ||
| # Per-worker WebCore::EventNames not reclaimed when a Worker thread exits — | ||
| # bounded by live worker count at exit; needs a ThreadGlobalData teardown | ||
| # follow-up rather than blocking every worker test locally. | ||
| leak:WebCore::EventNames::operator new | ||
| # `selectors` crate global caches (hashbrown tables) — process-lifetime statics. | ||
| leak:9selectors | ||
| # crypto.subtle lazy property: SubtleCrypto impl pinned by its JS wrapper at | ||
| # VM-destroy exit. Same JSC-owned ref-cycle class as RunLoop::dispatchAfter. | ||
| leak:WebCore::SubtleCrypto::create | ||
| # Rust std lazily-allocated pthread mutex storage (sys::sync::once_box) — | ||
| # intentionally never freed; one block per static mutex. | ||
| leak:8once_box | ||
|
Comment on lines
+123
to
+191
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding leaksan supressions is the opposite of making code leak-clean |
||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.