-
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 15 commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| --- | ||
| description: Verify a change to the Bun runtime by driving the debug build end-to-end. | ||
| --- | ||
|
|
||
| # Verifying a Bun runtime change | ||
|
|
||
| **Drive the debug build with `bun bd <args>`** — with exec args present, | ||
| build output is suppressed and a no-op rebuild is a quick dep-check, so | ||
| you get only the binary's output. | ||
|
|
||
| ```bash | ||
| bun bd --revision # build; prints version+hash on success | ||
| bun bd -e '<snippet>' # drive it | ||
| BUN_DEBUG_QUIET_LOGS=1 ... # suppress the very chatty debug tracing | ||
| ``` | ||
|
|
||
| ## Surfaces by area | ||
|
|
||
| - **JS-visible API** (`Bun.*`, Web APIs, `node:*` modules): a `-e` | ||
| one-liner is the surface. `bun bd -e 'console.log(new Request("https://x").url)'`. | ||
| - **CLI** (`bun install`, `bun build`, `bun test`): run the subcommand | ||
| in a `mktemp -d` scratch dir. Use `bunEnv` from `test/harness.ts` if | ||
| you need the CI-equivalent env. | ||
| - **Server/socket** (`Bun.serve`, `net`/`tls`/`http`): start a server on | ||
| `port: 0` in the `-e` script and hit it from the same process. | ||
| - **Memory/lifetime fixes** (leaks, UAF, teardown): set | ||
| `BUN_DESTRUCT_VM_ON_EXIT=1` so the VM actually tears down instead of | ||
| `_exit`ing; ASAN in the debug build then reports on stderr. A clean | ||
| `exitCode 0` + `signalCode null` is the pass signal — don't grep | ||
| stderr for "AddressSanitizer". | ||
|
|
||
| ## Gotchas | ||
|
|
||
| - `test/` deps need `cd test && bun install` first; some experimental | ||
| React deps (`react-server-dom-bun`) only resolve against the public | ||
| registry, not internal mirrors — set | ||
| `NPM_CONFIG_REGISTRY=https://registry.npmjs.org` if `bun install` 404s. | ||
| - Debug builds are 10-100× slower than release; a 5s test-file timeout | ||
| that CI hits comfortably will time out locally. Widen with | ||
| `--timeout 30000` before assuming a hang. | ||
| - `require("harness")` only resolves inside `test/` (path-mapped); | ||
| from a bare `-e` script, `cd test` first and `require("./harness.ts")`. | ||
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
Oops, something went wrong.
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.