Skip to content

bundler: don't panic on unterminated naming template placeholders - #36325

Merged
Jarred-Sumner merged 8 commits into
mainfrom
farm/70557840/naming-template-panic
Jul 30, 2026
Merged

Jarred-Sumner merged 8 commits into
mainfrom
farm/70557840/naming-template-panic

Conversation

@robobun

@robobun robobun commented Jul 29, 2026 •

Copy link
Copy Markdown
Collaborator

Repro

await Bun.build({ entrypoints: ["e.ts"], throw: false, naming: "[name" });
panic: range start index 5 out of range for slice of length 4
oh no: Bun has crashed.

Same from the CLI via --entry-naming='[name', and for any of [dir / [ext / [hash / [target appearing at the tail of naming or naming.{entry,chunk,asset}. throw: false does not help since the panic aborts the whole process.

Cause

path_template_print in src/bundler/options.rs scans for a matching ] and records its index in end_len. When none is found, end_len stays at remain.len(). If the text between [ and the end of the string happens to be a known placeholder name, the known-placeholder branch then advances with remain = &remain[end_len + 1..], one past the end.

The unknown-placeholder branch used &remain[end_len..] so it did not panic, but it wrote the placeholder text without the [ it had already consumed, so "a[b" became "ab" and "[foo]-[name].[ext]" became "foo]-index.js".

Fix

Validate up front. options::find_unterminated_placeholder scans a template with the same depth-counting as the printer and returns the position of any [ with no matching ]. The Bun.build config parser (JSBundler.rs) calls it for naming / naming.{entry,chunk,asset} and throws ERR_INVALID_ARG_TYPE with the placeholder text and byte position; the CLI flag parser (Arguments.rs) does the same for --entry-naming / --chunk-naming / --asset-naming and exits 1.

error: --entry-naming: unterminated "[name" placeholder (missing "]") at position 0

Make the printer total. In path_template_print, after the bracket scan, if no matching ] was found (count != 0), write the [ back and treat the remainder as literal text. For an unknown [placeholder] with a matching ], write [placeholder] verbatim and advance past the ] (esbuild keeps unknown placeholders as-is). The known-placeholder branch's end_len + 1 advance is now only reached when end_len < remain.len(). The old remain.is_empty() special case is subsumed and removed.

Tests

test/bundler/bundler_naming.test.ts (all via subprocess so a regression crashes the spawned process, not the test runner):

  • CLI --entry-naming: [name, [dir, [ext, [hash, [target, a[b.js, [name]-[hash.js each rejected with the --entry-naming: unterminated ... error; on main these either SIGABRT or silently write a wrong filename.
  • CLI --chunk-naming / --asset-naming: rejected with the matching flag name in the error.
  • CLI: [nonexistent]-[name].[ext] passes validation and writes [nonexistent]-entry.js (unknown placeholder kept literal); on main it writes nonexistent]-entry.js.
  • API: Bun.build with naming: "[name", naming: { chunk: "[name]-[hash" }, naming: { asset: "pre[post" } each reject with a catchable naming.*: unterminated ... error; on main the first panics and the other two succeed.

Plus a #[cfg(test)] unit test in options.rs covering the printer's literal fallback and the validator directly.

Fail-before: 13/13 fail on bun 1.3.14. Pass-after: 24 pass / 3 pre-existing todo on the debug build; bun-build-api.test.ts -t naming|hash green.


[review] gate passed · iteration 0 · 4 files touched

fails on main (without fix)
ASAN without fix: 14 failed, 3 skipped
$ BUN_DEBUG_QUIET_LOGS=1 bun scripts/build.ts --profile=debug --quiet test "--reporter=junit" "--reporter-outfile=/tmp/mechgate.xml" test/bundler/bundler_naming.test.ts
bun test v1.4.0 (e64f28124)

test/bundler/bundler_naming.test.ts:
(pass) bundler > naming/EntryNamingCollission [462.26ms]
(pass) bundler > naming/ImplicitOutbase1 [651.47ms]
(pass) bundler > naming/ImplicitOutbase2 [896.35ms]
(pass) bundler > naming/EntryNamingTemplate1 [921.28ms]
(todo) bundler > naming/EntryNamingTemplate2
(pass) bundler > naming/AssetNaming [345.94ms]
(pass) bundler > naming/AssetNamingMkdir [353.87ms]
(pass) bundler > naming/AssetNamingDir [352.42ms]
(todo) bundler > naming/AssetNoOverwrite
(pass) bundler > naming/AssetFileLoaderPath1 [86.13ms]
ENOENT opening root directory "/tmp/bun-build-tests/bun-wIfU1j/naming/NonexistantRoot/lib"

(pass) bundler > naming/NonexistantRoot [143.23ms]
(todo) bundler > naming/EntrypointOutsideOfRoot
(pass) bundler > naming/WithPathTraversal [913.22ms]
(pass) bundler > naming/NonAsciiSourceFilenameSymbol [366.91ms]
969 |       ]);
970 |       const stdout = Buffer.from(stdoutBytes);
971 |       const stderr = Buffer.from(stderrBytes);
972 |       
... (truncated)

release without fix: 1 failed, 3 skipped
bun test v1.4.0-canary.1 (3f83e96c5)

test/bundler/bundler_naming.test.ts:
(pass) bundler > naming/EntryNamingCollission [12.46ms]
(pass) bundler > naming/ImplicitOutbase1 [16.92ms]
(pass) bundler > naming/ImplicitOutbase2 [23.25ms]
(pass) bundler > naming/EntryNamingTemplate1 [20.99ms]
(todo) bundler > naming/EntryNamingTemplate2
(pass) bundler > naming/AssetNaming [8.71ms]
(pass) bundler > naming/AssetNamingMkdir [9.31ms]
(pass) bundler > naming/AssetNamingDir [8.39ms]
(todo) bundler > naming/AssetNoOverwrite
(pass) bundler > naming/AssetFileLoaderPath1 [3.16ms]
ENOENT opening root directory "/tmp/bun-build-tests/bun-owj1VU/naming/NonexistantRoot/lib"

(pass) bundler > naming/NonexistantRoot [2.14ms]
(todo) bundler > naming/EntrypointOutsideOfRoot
(pass) bundler > naming/WithPathTraversal [20.37ms]
(pass) bundler > naming/NonAsciiSourceFilenameSymbol [9.63ms]
(pass) bundler > naming/UnterminatedPlaceholder/[name [2.02ms]
(pass) bundler > naming/UnterminatedPlaceholder/[dir [1.71ms]
(pass) bundler > naming/UnterminatedPlaceholder/[ext [1.62ms]
(pass) bundler > naming/UnterminatedPlaceholder/[hash [2.12ms]
(pass) bundler > naming/UnterminatedPlaceholder/[target [2.0
... (truncated)
passes on PR (with fix)
ASAN with fix: 3 skipped
$ BUN_DEBUG_QUIET_LOGS=1 bun scripts/build.ts --profile=debug --quiet test "--reporter=junit" "--reporter-outfile=/tmp/mechgate.xml" test/bundler/bundler_naming.test.ts
bun test v1.4.0 (e64f28124)

test/bundler/bundler_naming.test.ts:
(pass) bundler > naming/EntryNamingCollission [489.90ms]
(pass) bundler > naming/ImplicitOutbase1 [651.15ms]
(pass) bundler > naming/ImplicitOutbase2 [899.76ms]
(pass) bundler > naming/EntryNamingTemplate1 [882.45ms]
(todo) bundler > naming/EntryNamingTemplate2
(pass) bundler > naming/AssetNaming [343.03ms]
(pass) bundler > naming/AssetNamingMkdir [356.95ms]
(pass) bundler > naming/AssetNamingDir [353.70ms]
(todo) bundler > naming/AssetNoOverwrite
(pass) bundler > naming/AssetFileLoaderPath1 [84.49ms]
ENOENT opening root directory "/tmp/bun-build-tests/bun-p1PawH/naming/NonexistantRoot/lib"

(pass) bundler > naming/NonexistantRoot [144.49ms]
(todo) bundler > naming/EntrypointOutsideOfRoot
(pass) bundler > naming/WithPathTraversal [893.44ms]
(pass) bundler > naming/NonAsciiSourceFilenameSymbol [369.22ms]
(pass) bundler > naming/UnterminatedPlaceholder/[name [441.27ms]
(pass) bundler > naming/UnterminatedPlaceholder/[dir [128.82ms]
(pass
... (truncated)

release with fix: 3 skipped
$ bun scripts/build.ts --profile=release
[configured] bun-profile → bun (stripped) in 657ms (unchanged)
ninja: Entering directory `/workspace/bun/build/release'
[1/6] gen generated_host_exports.rs
generated_host_exports.rs: 94 exports (host=3, lazy=10, generic=81, rust=0); 240 extern-C blocks audited
[1/6] cargo bun_bin → libbun_rust.a (--target x86_64-unknown-linux-gnu)

  nightly-2026-07-20-x86_64-unknown-linux-gnu unchanged - rustc 1.99.0-nightly (9f36de775 2026-07-19)

�[1m�[92m   Compiling�[0m bun_core v0.0.0 (/workspace/bun/src/bun_core)
�[1m�[92m   Compiling�[0m bun_errno v0.0.0 (/workspace/bun/src/errno)
�[1m�[92m   Compiling�[0m bun_ptr v0.0.0 (/workspace/bun/src/ptr)
�[1m�[92m   Compiling�[0m bun_boringssl_sys v0.0.0 (/workspace/bun/src/boringssl_sys)
�[1m�[92m   Compiling�[0m bun_safety v0.0.0 (/workspace/bun/src/safety)
�[1m�[92m   Compiling�[0m bun_zlib_sys v0.0.0 (/workspace/bun/src/zlib_sys)
�[1m�[92m   Compiling�[0m bun_cares_sys v0.0.0 (/workspace/bun/src/cares_sys)
�[1m�[92m   Compiling�[0m bun_zstd v0.0.0 (/workspace/bun/src/zstd)
�[1m�[92m   Compiling�[0m bun_picohttp v0.0.0 (/workspace/bun/src/picohttp)
�[1m�[92m   Compiling�[0m bun_output v
... (truncated)
diff hotspot
src/bundler/options.rs              | 95 ++++++++++++++++++++++++++++++++++---
 src/runtime/api/JSBundler.rs        | 15 ++++++
 src/runtime/cli/Arguments.rs        | 37 ++++++++++-----
 test/bundler/bundler_naming.test.ts | 85 ++++++++++++++++++++++++++++++++-
 4 files changed, 211 insertions(+), 21 deletions(-)

gate history · 3 passed · 0 rejected · iteration 0

evidence per changed file
file                                 reads  edits  tests
src/bundler/options.rs                   4     11      0
src/runtime/api/JSBundler.rs             2      2      0
src/runtime/cli/Arguments.rs             3      2      0
test/bundler/bundler_naming.test.ts      4      9      0

path_template_print advanced with remain[end_len + 1..] after expanding a
known placeholder, but when the template has no closing ']' end_len was
remain.len(), so the slice started one past the end and panicked. This
was reachable from any of the naming/--entry-naming options with a
truncated placeholder like '[name'.

When no matching ']' is found, treat the '[' and the remainder as
literal text. Unknown placeholders ('[foo]') are now kept verbatim in
the output instead of silently dropping the '[', matching esbuild.

Fixes #7810
@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Bundler naming template parsing now detects unterminated placeholders, preserves malformed and unknown placeholder output, and validates naming options in CLI and JavaScript API paths. Tests cover parser behavior, CLI errors, literal placeholders, and API failures.

Changes

Naming template validation

Layer / File(s) Summary
Template parser and malformed bracket handling
src/bundler/options.rs
Adds unterminated-placeholder detection, updates malformed-bracket rendering, and tests known, unknown, and unterminated placeholders.
CLI and JavaScript API validation
src/runtime/api/JSBundler.rs, src/runtime/cli/Arguments.rs
Validates naming templates before normalization and reports unterminated placeholders in API and CLI options.
CLI and API regression coverage
test/bundler/bundler_naming.test.ts
Tests malformed naming values, literal unknown placeholders, and API errors without panics.

Suggested reviewers: alii, jarred-sumner

🚥 Pre-merge checks | ✅ 2 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR fixes naming-template panics, but linked issue #7810 is about a Bun crash with testcontainers-node and native dependencies on macOS. Update the PR to address the testcontainers/ssh2/cpu-features crash in #7810, or relink the correct issue for these naming-template changes.
Out of Scope Changes check ⚠️ Warning The naming-template parser, CLI, API, and tests are unrelated to linked issue #7810, so these changes are out of scope. Remove the naming-template work from this PR, or retarget it to the correct issue instead of #7810.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: preventing panics on unterminated naming placeholders.
Description check ✅ Passed The description covers the problem, cause, fix, and verification, which satisfies the template's required content.

Comment @coderabbitai help to get the list of available commands.

@robobun

robobun commented Jul 29, 2026 •

Copy link
Copy Markdown
Collaborator Author
Updated 11:35 PM PT - Jul 28th, 2026

@robobun, your commit 3f83e96 is building: #84947

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — tight fix for a user-reachable panic on malformed naming templates.

What was reviewed:

  • Traced path_template_print on [name, foo[, [foo]-[name].[ext], [[name]], [name][ext — the new count != 0 guard subsumes the removed remain.is_empty() check and every end_len + 1 slice is now guarded by end_len < remain.len().
  • Unknown-placeholder branch now emits [placeholder] verbatim (matching esbuild) instead of dropping the [; checked no existing tests depend on the old corrupted output.
  • Tests: 5 CLI-backend panic repros + 3 wrong-filename repros in bundler_naming.test.ts, plus a #[cfg(test)] unit test covering the same shapes and the empty/trailing-[ edges.
Extended reasoning...

Overview

Fixes a slice-past-end panic in path_template_print (src/bundler/options.rs) when a naming template ends in a known placeholder name with no closing ] (e.g. naming: "[name"). The scan loop left end_len = remain.len() when no ] was found, and the known-placeholder branch then did &remain[end_len + 1..]. The fix adds an explicit count != 0 bail-out that writes the [ back and treats the tail as literal, and reworks the unknown-placeholder branch to emit [placeholder] verbatim and advance past the ] (previously it dropped the leading [ and left remain pointing at the ], so [foo]-[name] became foo]-index). The obsolete remain.is_empty() special case + TODO is removed — it is strictly subsumed by count != 0 (an empty remain never enters the scan loop, so count stays 1).

Security risks

None. This is output-path template formatting; the change only affects how literal [ bytes are echoed when the user's own template is malformed. The existing write_sanitized_parent_dirs traversal guard is untouched and still applies to [dir] expansion; the new literal pass-through just echoes back what the user typed.

Level of scrutiny

Low-to-moderate. The function is a small pure byte-writer over a user-supplied template string; the diff is ~15 lines of control flow with no new allocation, no unsafe, no FFI. The panic was a user-reachable crash (REVIEW.md: user-reachable failures must not panic), so the fix is required, and matching esbuild's pass-through behavior is the documented reference. I hand-traced the loop on [name, foo[, empty, [[name]] (nested), [name][ext, and [foo]-[name].[ext] — all produce the expected verbatim/substituted output, and every end_len + 1 slice is now reached only when count == 0 ⇒ end_len < remain.len(). The tightened debug_assert!(end_len < remain.len()) is correct since end_len = idx is a valid index when the loop broke.

Other factors

Test coverage is thorough: a Rust unit test exercises 12 template shapes directly against the printer, and 8 new itBundled cases run via backend: "cli" so a regression crashes the spawned bun build rather than the test process (per the PR description, all 5 panic cases SIGABRT on system bun and 3 produce wrong filenames — satisfying fail-before/pass-after). The only other caller of path_template_print is via PathTemplate{,Const}::print in generateChunksInParallel.rs, which passes well-formed built-in templates or the same user-supplied entry_naming/chunk_naming/asset_naming strings this fix targets. No prior review comments to address.

Add options::find_unterminated_placeholder and call it from the
Bun.build config parser (JSBundler.rs) and the --entry/chunk/asset-naming
CLI flag parser (Arguments.rs). An unmatched '[' now surfaces as a
normal config error instead of reaching path_template_print. The
printer's literal fallback from the previous commit stays as
defense-in-depth.

Tests updated: the CLI cases now assert the validation error, plus
three Bun.build API subprocess tests covering naming / naming.chunk /
naming.asset. UnknownPlaceholderIsLiteral is unchanged (balanced
brackets pass validation and are emitted verbatim).
Comment thread src/bundler/options.rs Outdated
Comment thread src/bundler/options.rs Outdated
Comment thread src/bundler/options.rs Outdated
Comment thread src/bundler/options.rs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/bundler/options.rs`:
- Around line 2261-2289: Extend the delimiter-only test coverage in the existing
template printer and validator tests: assert that path_template_print preserves
a standalone closing bracket (b"]"), and assert that
find_unterminated_placeholder returns None for the same input. Keep the existing
behavior for other stray and well-formed bracket cases unchanged.

In `@test/bundler/bundler_naming.test.ts`:
- Around line 334-346: Expand the malformed-template matrix in the
unterminated-placeholder tests to cover --chunk-naming and --asset-naming
alongside --entry-naming. Add cases using each flag’s corresponding
configuration field and assert the diagnostic identifies the correct CLI flag,
including sibling entry points as required by the existing naming test
structure.
- Around line 328-333: In test/bundler/bundler_naming.test.ts at lines 328-333,
keep only the issue URL comment for `#7810`; at lines 365-367, replace the
existing prose with that same URL-only comment. Do not retain historical
implementation details.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 64e954d9-4129-4511-af2a-954a6b95c099

📥 Commits

Reviewing files that changed from the base of the PR and between 59242d6 and 113906e.

📒 Files selected for processing (4)
  • src/bundler/options.rs
  • src/runtime/api/JSBundler.rs
  • src/runtime/cli/Arguments.rs
  • test/bundler/bundler_naming.test.ts

Comment thread src/bundler/options.rs
Comment thread test/bundler/bundler_naming.test.ts Outdated
Comment thread test/bundler/bundler_naming.test.ts
GitHub issue 7810 is a testcontainers bug, not this one; remove the
reference from test comments.

Add a lone-']' case to the printer/validator unit test and
--chunk-naming / --asset-naming CLI tests alongside --entry-naming.
Comment thread test/bundler/bundler_naming.test.ts Outdated
Comment thread src/runtime/api/JSBundler.rs Outdated
The string shorthand Bun.build({ naming: "..." }) now reports 'naming:'
instead of 'naming.entry:'. The object form still reports the dotted key.
API tests now assert the exact option prefix.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — both earlier notes (stderr assertion, naming vs naming.entry in the string-shorthand error) are addressed.

What was reviewed:

  • path_template_print is now total: the count != 0 guard makes the end_len + 1 slice unreachable when no ] was found; unknown [foo] is kept verbatim (matches esbuild).
  • find_unterminated_placeholder uses the same depth-counting as the printer; unit test asserts they agree on the boundary cases (], [, empty, well-formed).
  • CLI loop over (flag, &mut slot) is behavior-identical to the three blocks it replaces and follows the file's Output::err_generic + Global::exit(1) convention.
  • API test now asserts the exact option prefix (naming / naming.entry / naming.chunk / naming.asset) so a regression in the message wording fails.
Extended reasoning...

Overview

Fixes a Rust slice-bounds panic in path_template_print (src/bundler/options.rs) reachable from both bun build --entry-naming '[name' and Bun.build({ naming: '[name' }). Adds up-front validation at both entry points (Arguments.rs, JSBundler.rs) with a shared find_unterminated_placeholder helper, and makes the printer itself total so any future unvalidated caller falls back to literal output instead of panicking. The unknown-placeholder branch is also fixed to emit [foo] verbatim rather than the previous foo].

Security risks

None. Input is a config string; the fix converts a process-aborting panic into a catchable validation error, which is strictly a hardening. No new syscalls, no path handling changes beyond what the printer already did.

Level of scrutiny

Medium. It touches the bundler's output-path templating, but the change is narrowly scoped to bracket handling and is covered by both a Rust unit test (printer + validator on all delimiter edge cases including ], [, empty) and integration tests spawning subprocesses so a regressed panic fails the test rather than the runner. The PR description includes fail-before/pass-after evidence on ASAN and release.

Other factors

All prior review feedback is addressed: my two inline notes (drop the negative panic assertion → now expect(stderr).toBe(""); use naming: instead of naming.entry: for the string shorthand), CodeRabbit's three (cover ], cover --chunk-naming/--asset-naming, drop the wrong #7810 reference), and the comment-cop flags (long comments trimmed). The Arguments.rs refactor collapses three copy-pasted blocks into one loop and reuses the file's existing Output::err_generic + Global::exit(1) pattern. The one intentional behavior change — unknown [placeholder] kept literal — matches esbuild and has its own naming/UnknownPlaceholderIsLiteral test.

@robobun

robobun commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator Author

Build #84950 is failing on 18 unrelated flaky tests (spawn-streaming-stdout, jsonc, watch-many-dirs, fastutf8stream-reopen, fetch-tls-abortsignal-timeout, solc, node-http-pinned-write, proxy-stress-protocol, fetch-http2-client, multi-run, serve-body-leak, fetch-http3-client, coverage, streams-leak, regressions 14029/08965/09279/20144), all tagged [flaky] by ci:errors (passed alone or on retry). None touch the bundler, and test/bundler/bundler_naming.test.ts passed on every lane.

The diff is green: 25 pass / 3 pre-existing todo locally on the ASAN debug build, 13/13 fail-before on bun 1.3.14. Ready for a maintainer to merge past the unrelated flake.

Comment thread src/bundler/options.rs
}

/// `Some((index_of_open_bracket, &template[index..]))` when a `[` has no matching `]`.
pub fn find_unterminated_placeholder(template: &[u8]) -> Option<(usize, &[u8])> {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a test only function and should be gated as such.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the validator that produces the up-front error for both entry points (the second commit in this PR), not test-only:

The #[cfg(test)] unit test further down calls it too, which is probably why it read as test-only from the diff hunk. Happy to restructure if you'd prefer it elsewhere (e.g. a PathTemplate::find_unterminated associated fn).

@Jarred-Sumner
Jarred-Sumner merged commit cb11e6c into main Jul 30, 2026
53 of 55 checks passed
@Jarred-Sumner
Jarred-Sumner deleted the farm/70557840/naming-template-panic branch July 30, 2026 02:02
hughescr added a commit to hughescr/bun that referenced this pull request Jul 31, 2026
* upstream/main: (422 commits)
  install: drop packages held only by optional-peer resolution slots from bun.lock (oven-sh#35681)
  Update mimalloc to the upstream dev3 (v3.4.3) sync (oven-sh#36431)
  compile(pe): ftruncate the Windows --compile output after writing (oven-sh#36430)
  Strong: back bun_jsc::Strong with StrongRootBlock; free AbortSignal.timeout at wrapper GC (oven-sh#35849)
  test(harness): replace toRun matcher with async bunRun + toSpawn (oven-sh#36424)
  test: measure memory via harness rss() instead of process.memoryUsage.rss() (oven-sh#36429)
  Deflake a few tests
  no-orphans(windows): allow CREATE_BREAKAWAY_FROM_JOB and set DIE_ON_UNHANDLED_EXCEPTION on the Job (oven-sh#36414)
  GarbageCollectionController: replace per-tick heap sampler with idle timer only (oven-sh#35356)
  exe_format(pe): write a valid OptionalHeader.CheckSum for --compile output (oven-sh#36383)
  FileSink: flush buffered bytes when process.exit() runs in the same tick as write() (oven-sh#36250)
  test(http): speed up and de-flake serve-async-stream-client-abort.test.ts (oven-sh#35919)
  test(20144): stop racing child startup against the 1s SIGKILL guard (oven-sh#34166)
  test(no-orphans): skip fast-exit perl daemon test on macOS (oven-sh#36413)
  fs: return negative BigIntStats *Ns for pre-epoch timestamps (oven-sh#36187)
  event_loop: make DeferredTaskQueue::run tolerate re-entrant map mutation (oven-sh#32703)
  dotenv: stop panicking on nested `${...}` inside `${VAR:-default}` (oven-sh#36199)
  fetch: make the idle timer an absolute deadline for the response header block (oven-sh#36145)
  bundler: don't panic on unterminated naming template placeholders (oven-sh#36325)
  Buffer#indexOf/lastIndexOf: rare-byte SIMD filter with a Two-Way O(n+m) fallback (oven-sh#36420)
  ...

# Conflicts:
#	src/jsc/bindings/BunDebugger.cpp
hughescr added a commit to hughescr/bun that referenced this pull request Jul 31, 2026
* upstream/main: (422 commits)
  install: drop packages held only by optional-peer resolution slots from bun.lock (oven-sh#35681)
  Update mimalloc to the upstream dev3 (v3.4.3) sync (oven-sh#36431)
  compile(pe): ftruncate the Windows --compile output after writing (oven-sh#36430)
  Strong: back bun_jsc::Strong with StrongRootBlock; free AbortSignal.timeout at wrapper GC (oven-sh#35849)
  test(harness): replace toRun matcher with async bunRun + toSpawn (oven-sh#36424)
  test: measure memory via harness rss() instead of process.memoryUsage.rss() (oven-sh#36429)
  Deflake a few tests
  no-orphans(windows): allow CREATE_BREAKAWAY_FROM_JOB and set DIE_ON_UNHANDLED_EXCEPTION on the Job (oven-sh#36414)
  GarbageCollectionController: replace per-tick heap sampler with idle timer only (oven-sh#35356)
  exe_format(pe): write a valid OptionalHeader.CheckSum for --compile output (oven-sh#36383)
  FileSink: flush buffered bytes when process.exit() runs in the same tick as write() (oven-sh#36250)
  test(http): speed up and de-flake serve-async-stream-client-abort.test.ts (oven-sh#35919)
  test(20144): stop racing child startup against the 1s SIGKILL guard (oven-sh#34166)
  test(no-orphans): skip fast-exit perl daemon test on macOS (oven-sh#36413)
  fs: return negative BigIntStats *Ns for pre-epoch timestamps (oven-sh#36187)
  event_loop: make DeferredTaskQueue::run tolerate re-entrant map mutation (oven-sh#32703)
  dotenv: stop panicking on nested `${...}` inside `${VAR:-default}` (oven-sh#36199)
  fetch: make the idle timer an absolute deadline for the response header block (oven-sh#36145)
  bundler: don't panic on unterminated naming template placeholders (oven-sh#36325)
  Buffer#indexOf/lastIndexOf: rare-byte SIMD filter with a Two-Way O(n+m) fallback (oven-sh#36420)
  ...
hughescr added a commit to hughescr/bun that referenced this pull request Jul 31, 2026
* upstream/main: (422 commits)
  install: drop packages held only by optional-peer resolution slots from bun.lock (oven-sh#35681)
  Update mimalloc to the upstream dev3 (v3.4.3) sync (oven-sh#36431)
  compile(pe): ftruncate the Windows --compile output after writing (oven-sh#36430)
  Strong: back bun_jsc::Strong with StrongRootBlock; free AbortSignal.timeout at wrapper GC (oven-sh#35849)
  test(harness): replace toRun matcher with async bunRun + toSpawn (oven-sh#36424)
  test: measure memory via harness rss() instead of process.memoryUsage.rss() (oven-sh#36429)
  Deflake a few tests
  no-orphans(windows): allow CREATE_BREAKAWAY_FROM_JOB and set DIE_ON_UNHANDLED_EXCEPTION on the Job (oven-sh#36414)
  GarbageCollectionController: replace per-tick heap sampler with idle timer only (oven-sh#35356)
  exe_format(pe): write a valid OptionalHeader.CheckSum for --compile output (oven-sh#36383)
  FileSink: flush buffered bytes when process.exit() runs in the same tick as write() (oven-sh#36250)
  test(http): speed up and de-flake serve-async-stream-client-abort.test.ts (oven-sh#35919)
  test(20144): stop racing child startup against the 1s SIGKILL guard (oven-sh#34166)
  test(no-orphans): skip fast-exit perl daemon test on macOS (oven-sh#36413)
  fs: return negative BigIntStats *Ns for pre-epoch timestamps (oven-sh#36187)
  event_loop: make DeferredTaskQueue::run tolerate re-entrant map mutation (oven-sh#32703)
  dotenv: stop panicking on nested `${...}` inside `${VAR:-default}` (oven-sh#36199)
  fetch: make the idle timer an absolute deadline for the response header block (oven-sh#36145)
  bundler: don't panic on unterminated naming template placeholders (oven-sh#36325)
  Buffer#indexOf/lastIndexOf: rare-byte SIMD filter with a Two-Way O(n+m) fallback (oven-sh#36420)
  ...

# Conflicts:
#	src/js/internal/debugger.ts
hughescr added a commit to hughescr/bun that referenced this pull request Jul 31, 2026
* upstream/main: (422 commits)
  install: drop packages held only by optional-peer resolution slots from bun.lock (oven-sh#35681)
  Update mimalloc to the upstream dev3 (v3.4.3) sync (oven-sh#36431)
  compile(pe): ftruncate the Windows --compile output after writing (oven-sh#36430)
  Strong: back bun_jsc::Strong with StrongRootBlock; free AbortSignal.timeout at wrapper GC (oven-sh#35849)
  test(harness): replace toRun matcher with async bunRun + toSpawn (oven-sh#36424)
  test: measure memory via harness rss() instead of process.memoryUsage.rss() (oven-sh#36429)
  Deflake a few tests
  no-orphans(windows): allow CREATE_BREAKAWAY_FROM_JOB and set DIE_ON_UNHANDLED_EXCEPTION on the Job (oven-sh#36414)
  GarbageCollectionController: replace per-tick heap sampler with idle timer only (oven-sh#35356)
  exe_format(pe): write a valid OptionalHeader.CheckSum for --compile output (oven-sh#36383)
  FileSink: flush buffered bytes when process.exit() runs in the same tick as write() (oven-sh#36250)
  test(http): speed up and de-flake serve-async-stream-client-abort.test.ts (oven-sh#35919)
  test(20144): stop racing child startup against the 1s SIGKILL guard (oven-sh#34166)
  test(no-orphans): skip fast-exit perl daemon test on macOS (oven-sh#36413)
  fs: return negative BigIntStats *Ns for pre-epoch timestamps (oven-sh#36187)
  event_loop: make DeferredTaskQueue::run tolerate re-entrant map mutation (oven-sh#32703)
  dotenv: stop panicking on nested `${...}` inside `${VAR:-default}` (oven-sh#36199)
  fetch: make the idle timer an absolute deadline for the response header block (oven-sh#36145)
  bundler: don't panic on unterminated naming template placeholders (oven-sh#36325)
  Buffer#indexOf/lastIndexOf: rare-byte SIMD filter with a Two-Way O(n+m) fallback (oven-sh#36420)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants