Skip to content

wtf-bindings: use WTF ASSERT() so debug builds compile#30992

Open
robobun wants to merge 4 commits into
mainfrom
farm/9ea10d7b/wtf-bindings-assert
Open

wtf-bindings: use WTF ASSERT() so debug builds compile#30992
robobun wants to merge 4 commits into
mainfrom
farm/9ea10d7b/wtf-bindings-assert

Conversation

@robobun
Copy link
Copy Markdown
Collaborator

@robobun robobun commented May 18, 2026

Fixes #30988.

Repro

bun install
bun bd
unified/../../../src/jsc/bindings/wtf-bindings.cpp:64:5: error: use of undeclared identifier 'assert'
   64 |     assert(tio != NULL);
      |     ^~~~~~

Cause

uv__tty_make_raw() in src/jsc/bindings/wtf-bindings.cpp calls the libc assert() macro, but the file never includes <cassert> or <assert.h>. It was reaching assert transitively through a WebKit header; the WebKit upgrade in #30705 dropped that include, so on current main the unified-source unit containing wtf-bindings.cpp fails to compile in debug.

Release builds are unaffected because NDEBUG makes assert a no-op before name lookup, and because the unified grouping differs from debug — whichever sibling was pulling <cassert> in happens to still land in that bundle.

Fix

Swap assert(tio != NULL)ASSERT(tio != NULL). ASSERT is the WTF-style assertion already used elsewhere in the same file (line 256) and defined by <wtf/Assertions.h>, which is already in scope via the other WTF includes. No new includes needed.

Verification

# Before (at HEAD = 4c8a21b149):
$ bun bd
...
error: use of undeclared identifier 'assert'

# After:
$ bun bd
[build] done

$ bun bd test test/js/bun/terminal/terminal.test.ts -t setRawMode
 5 pass
 0 fail

The added test (Bun.Terminal > setRawMode > setRawMode toggles on a real PTY fd) exercises Bun__ttySetMode — the same translation unit as uv__tty_make_raw — against a real PTY fd and asserts ICANON/ECHO flip off and back on through a setRawMode(true)setRawMode(false) round-trip. Proves both the file compiled and the runtime path behaves correctly.

Several open PRs (#30243, #30975, #30980, #30981) carry this one-line fix as a drive-by; none are focused on #30988. This PR is dedicated to the build break so it can land first and unblock debug builds on main.

The libc assert() here relied on <cassert> being pulled in transitively
by a WebKit header. After the WebKit upgrade in #30705 that include is
gone, so debug builds fail on the unified-source unit that contains
wtf-bindings.cpp:

    src/jsc/bindings/wtf-bindings.cpp:64:5:
    error: use of undeclared identifier 'assert'

ASSERT() is the WTF-style assertion used elsewhere in the same file and
does not depend on a libc header being in scope. Release builds were
unaffected because the unified grouping happened to still pull cassert
in there.

Fixes #30988
@robobun
Copy link
Copy Markdown
Collaborator Author

robobun commented May 18, 2026

Updated 11:47 AM PT - May 18th, 2026

@robobun, your commit 491196331d4dd3c584ff7bbf1f776815643d7359 passed in Build #55854! 🎉


🧪   To try this PR locally:

bunx bun-pr 30992

That installs a local version of the PR into your bun-30992 executable, so you can run:

bun-30992 --bun

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 18, 2026

Review Change Stack

Walkthrough

Replaces a lowercase assert with the project ASSERT macro in uv__tty_make_raw and adds a POSIX-only regression test that toggles raw mode on a real Bun.Terminal PTY and verifies ICANON and ECHO flag transitions.

Changes

TTY Raw Mode Build and Test

Layer / File(s) Summary
Build fix: assert to ASSERT macro in wtf-bindings
src/jsc/bindings/wtf-bindings.cpp
In uv__tty_make_raw, the null check assertion changes from assert(tio != NULL); to ASSERT(tio != NULL); to avoid an undeclared assert identifier when <cassert> is not transitively included.
Regression test: setRawMode termios flag transitions
test/js/bun/terminal/terminal.test.ts
Adds a POSIX-only test that enables and disables raw mode on a real PTY via Bun.Terminal#setRawMode and asserts ICANON and ECHO bits in terminal.localFlags are cleared when enabling raw mode and restored when disabling it.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: replacing libc assert() with WTF ASSERT() to fix debug build compilation.
Description check ✅ Passed The description provides comprehensive context including reproduction steps, root cause analysis, the proposed fix, and detailed verification results.
Linked Issues check ✅ Passed The PR successfully addresses issue #30988 by replacing the problematic assert() call with ASSERT(), fixing the debug build compilation error as required.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the debug build issue: the core fix in wtf-bindings.cpp and a focused test verifying the PTY mode-setting code path.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment thread test/js/bun/terminal/terminal.test.ts Outdated
ICANON is 0x2 on Linux/BSD but 0x100 on Darwin (bit 0x2 is ECHOE on
macOS, which Bun__ttySetMode mode=1 does not clear). Match the style
already used in terminal-spawn.test.ts so macOS CI doesn't fail the
new PTY-fd regression test.
Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

LGTM — the macOS ICANON fix landed; the remaining inline note is a non-blocking comment-wording nit.

Extended reasoning...

Overview

This PR makes a one-line change to src/jsc/bindings/wtf-bindings.cpp (assertASSERT) to fix a debug-build compile break introduced when the WebKit upgrade dropped a transitive <cassert> include, plus a ~25-line regression test in test/js/bun/terminal/terminal.test.ts that exercises setRawMode on a real PTY and asserts ICANON/ECHO flip correctly.

Security risks

None. The C++ change swaps one assertion macro for another with identical semantics (debug-only null check on a stack-local pointer). The test change is purely additive in the test suite.

Level of scrutiny

Low. The ASSERT macro is already used in this exact file (line 256) and is provided by <wtf/Assertions.h> which is in scope via existing WTF includes — this is the canonical assertion style for this codebase. The fix is mechanical, well-explained, and several other open PRs carry the same one-liner as a drive-by.

Other factors

  • I previously flagged that the test hardcoded ICANON = 0x2 (Linux-only); the author fixed this in 4262bbc with a per-platform value, and that thread is resolved.
  • The only new finding from this run is a cosmetic nit: the test comment groups "BSD" on the Linux side of the ICANON value when BSDs actually use 0x100 like Darwin. The code is correct for every platform Bun targets (linux/darwin, with Windows skipped), so this is purely a wording issue in a comment about platforms Bun doesn't ship — non-blocking.
  • Neither file is covered by CODEOWNERS.
  • This unblocks debug builds on main, so there's value in landing it promptly.

Comment thread test/js/bun/terminal/terminal.test.ts Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@test/js/bun/terminal/terminal.test.ts`:
- Around line 296-309: The assertions about the ECHO bit are incorrect given
that Bun.Terminal initializes with echo off; update the expectations in the test
around terminal.localFlags so they assert ECHO is cleared (toBe(0)) for
beforeLflag, rawLflag, and restoredLflag instead of asserting it is set, leaving
the ICANON checks unchanged; locate the assertions near the calls to
terminal.setRawMode(true)/setRawMode(false) and adjust the three expect(... &
ECHO) lines accordingly (references: terminal.localFlags, terminal.setRawMode,
constants ICANON and ECHO, helper enableEcho).
🪄 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: ec3efa42-b21f-4d4a-bb6b-3ec18c4c4906

📥 Commits

Reviewing files that changed from the base of the PR and between 4262bbc and 77974b9.

📒 Files selected for processing (1)
  • test/js/bun/terminal/terminal.test.ts

Comment on lines +296 to +309
const beforeLflag = terminal.localFlags;
expect(beforeLflag & ICANON).not.toBe(0);
expect(beforeLflag & ECHO).not.toBe(0);

terminal.setRawMode(true);
const rawLflag = terminal.localFlags;
expect(rawLflag & ICANON).toBe(0);
expect(rawLflag & ECHO).toBe(0);

terminal.setRawMode(false);
const restoredLflag = terminal.localFlags;
expect(restoredLflag & ICANON).not.toBe(0);
expect(restoredLflag & ECHO).not.toBe(0);
});
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check default ECHO flag state in Bun.Terminal on POSIX

bun -e '
const t = new Bun.Terminal({});
const ECHO = 0x8;
const echoEnabled = (t.localFlags & ECHO) !== 0;
console.log("ECHO enabled by default:", echoEnabled);
t.close();
'

Repository: oven-sh/bun

Length of output: 99


🏁 Script executed:

cd /tmp && wc -l test/js/bun/terminal/terminal.test.ts 2>/dev/null || find . -path "*test/js/bun/terminal*" -name "*.ts" 2>/dev/null

Repository: oven-sh/bun

Length of output: 37


🏁 Script executed:

head -20 test/js/bun/terminal/terminal.test.ts

Repository: oven-sh/bun

Length of output: 769


🏁 Script executed:

# Check the enableEcho helper and surrounding context (lines 1-10)
sed -n '1,20p' test/js/bun/terminal/terminal.test.ts

Repository: oven-sh/bun

Length of output: 769


🏁 Script executed:

# Read the entire test file to verify the claims
cat test/js/bun/terminal/terminal.test.ts

Repository: oven-sh/bun

Length of output: 35985


🏁 Script executed:

# Let's search for the enableEcho function and its usages
rg -n "enableEcho" test/js/bun/terminal/terminal.test.ts -A 2 -B 2

Repository: oven-sh/bun

Length of output: 1367


🏁 Script executed:

# Also check for ECHO and ICANON constants
rg -n "const ECHO|const ICANON" test/js/bun/terminal/terminal.test.ts

Repository: oven-sh/bun

Length of output: 198


🏁 Script executed:

# Check lines 290-315 for the disputed test
sed -n '290,315p' test/js/bun/terminal/terminal.test.ts

Repository: oven-sh/bun

Length of output: 999


🏁 Script executed:

# Read specific line ranges
head -30 test/js/bun/terminal/terminal.test.ts

Repository: oven-sh/bun

Length of output: 992


🏁 Script executed:

cat -n test/js/bun/terminal/terminal.test.ts | sed -n '1,50p'

Repository: oven-sh/bun

Length of output: 1766


🏁 Script executed:

python3 << 'EOF'
import os
filepath = 'test/js/bun/terminal/terminal.test.ts'
if os.path.exists(filepath):
    with open(filepath, 'r') as f:
        lines = f.readlines()
        print(f"Total lines: {len(lines)}")
        # Show lines 1-20
        print("\n=== Lines 1-20 ===")
        for i in range(min(20, len(lines))):
            print(f"{i+1:3d}: {lines[i]}", end='')
else:
    print(f"File not found: {filepath}")
EOF

Repository: oven-sh/bun

Length of output: 907


🏁 Script executed:

git ls-files | grep terminal | grep test

Repository: oven-sh/bun

Length of output: 189


🏁 Script executed:

ls -la test/js/bun/ 2>&1 | head -20

Repository: oven-sh/bun

Length of output: 1221


🏁 Script executed:

# Check if the directory exists
ls -d test/js/bun/terminal 2>&1 || echo "Directory not found"
# List all test files
ls test/js/bun/*.test.ts 2>&1 | head

Repository: oven-sh/bun

Length of output: 350


🏁 Script executed:

# Search for the test mentioned in the review
rg "setRawMode" . --type ts --type tsx -l

Repository: oven-sh/bun

Length of output: 83


🏁 Script executed:

# Find all test files with "terminal" in the name
find . -name "*terminal*" 2>/dev/null | grep -E "\.(ts|tsx|js)$"

Repository: oven-sh/bun

Length of output: 195


🏁 Script executed:

# Also search for ECHO constant definitions
rg "const ECHO" --type ts --type tsx

Repository: oven-sh/bun

Length of output: 83


🏁 Script executed:

# Check if there's a Bun.Terminal test file
rg "Bun.Terminal" test --type ts --type tsx -l

Repository: oven-sh/bun

Length of output: 83


🏁 Script executed:

# Try to find any reference to the Terminal class or test
rg "class.*Terminal|function.*Terminal|new.*Terminal" test --type ts --type tsx -l | head

Repository: oven-sh/bun

Length of output: 83


🏁 Script executed:

# Search for any Terminal-related test
fd -e test.ts -e test.tsx -e test.js test/ | xargs grep -l "Terminal" 2>/dev/null | head

Repository: oven-sh/bun

Length of output: 381


Verify ECHO flag initial state—contradicts existing helper documentation.

Lines 298 and 308 assert that the ECHO flag is enabled in the default terminal state and after disabling raw mode:

expect(beforeLflag & ECHO).not.toBe(0);  // expects ECHO enabled initially
...
expect(restoredLflag & ECHO).not.toBe(0); // expects ECHO enabled after restore

However, the enableEcho helper (line 4) documents that "echo is disabled by default to avoid duplication", and all existing tests explicitly call enableEcho(terminal) before exercising echo behavior (e.g., lines 483, 507, 532, 553, 571, 776, 829, 945), confirming that Bun.Terminal initializes with ECHO off.

The test should instead expect:

expect(beforeLflag & ECHO).toBe(0);      // ECHO disabled initially
expect(rawLflag & ECHO).toBe(0);         // ECHO still disabled in raw mode
expect(restoredLflag & ECHO).toBe(0);    // ECHO remains disabled after restore

While the test's primary goal (proving wtf-bindings.cpp compiled by exercising Bun__ttySetMode on a real PTY fd) is sound, these incorrect assertions will cause spurious test failures.

🤖 Prompt for 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.

In `@test/js/bun/terminal/terminal.test.ts` around lines 296 - 309, The assertions
about the ECHO bit are incorrect given that Bun.Terminal initializes with echo
off; update the expectations in the test around terminal.localFlags so they
assert ECHO is cleared (toBe(0)) for beforeLflag, rawLflag, and restoredLflag
instead of asserting it is set, leaving the ICANON checks unchanged; locate the
assertions near the calls to terminal.setRawMode(true)/setRawMode(false) and
adjust the three expect(... & ECHO) lines accordingly (references:
terminal.localFlags, terminal.setRawMode, constants ICANON and ECHO, helper
enableEcho).

Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

LGTM — both earlier comments addressed; one-line assertASSERT build fix plus a well-scoped regression test.

Extended reasoning...

Overview

This PR makes two changes:

  1. src/jsc/bindings/wtf-bindings.cpp: swaps libc assert(tio != NULL) for WTF ASSERT(tio != NULL) in uv__tty_make_raw. The ASSERT macro is already used elsewhere in the same file and is provided by <wtf/Assertions.h> which is already in scope, so no new includes are needed. This fixes the debug-build break (#30988) introduced when the WebKit upgrade dropped the transitive <cassert> include.
  2. test/js/bun/terminal/terminal.test.ts: adds a POSIX-only regression test that round-trips setRawMode(true/false) on a real PTY and asserts ICANON/ECHO flip correctly via terminal.localFlags.

Security risks

None. The C++ change is a debug-only assertion macro swap with identical semantics (no-op in release, abort-on-false in debug). The test is read-only against a freshly-allocated PTY and adds no new attack surface.

Level of scrutiny

Low. The production change is literally one identifier — assertASSERT — and the same fix is already being carried as a drive-by in four other open PRs, indicating broad agreement that this is the correct resolution. The accompanying test follows existing patterns in the same file (e.g. the PENDIN masking and skipIf(isWindows) gating already present).

Other factors

I raised two concerns on earlier revisions of this PR, both now resolved:

  • The hardcoded ICANON = 0x2 was Linux-only and would have failed on macOS CI → fixed in 4262bbc with process.platform === "darwin" ? 0x100 : 0x2.
  • A comment incorrectly grouped BSD with Linux → fixed in 77974b9.

The current diff reflects both fixes, all inline threads are marked resolved, no CODEOWNERS cover these paths, and the bug-hunting system found no new issues on the latest revision. Given this PR's purpose is to unblock debug builds on main, it's a good candidate to land quickly.

Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

LGTM — both of my earlier comments were addressed. Re the open CodeRabbit note on ECHO: Terminal.zig:545 initializes the slave termios with .ECHO = true (shared with the master fd that localFlags reads from), so expect(beforeLflag & ECHO).not.toBe(0) is correct as written; the enableEcho helper comment is just stale.

Extended reasoning...

Overview

This PR is a one-line build fix in src/jsc/bindings/wtf-bindings.cpp (assertASSERT) plus a ~25-line regression test in test/js/bun/terminal/terminal.test.ts. The C++ change swaps the libc assert macro for WTF's ASSERT, which is already used at line 256 of the same file and is in scope via <wtf/Assertions.h>. This unblocks debug builds broken by the WebKit upgrade in #30705.

Security risks

None. The change is a debug-only assertion macro swap with identical semantics; no inputs, outputs, auth, or data handling are touched.

Level of scrutiny

Low. The C++ change is mechanical and matches an existing pattern in the same file. The test is additive, POSIX-gated, and exercises an existing public API (Bun.Terminal#setRawMode / localFlags). The PR's purpose is to unblock debug builds on main, so it's time-sensitive.

Other factors

  • Both inline comments I raised earlier (platform-specific ICANON value; misplaced "BSD" in the comment) were addressed in 4262bbc and 77974b9 and are resolved.
  • CodeRabbit's unresolved comment claims ECHO is off by default, citing the enableEcho helper's docstring. I verified against src/runtime/api/bun/Terminal.zig:541-549: the constructor explicitly sets .ECHO = true on the slave fd, and getTermiosFlag reads from master_fd (line 763), which shares termios with the slave on a PTY pair. The PR author also reports 5/5 passing locally, which would not be possible if beforeLflag & ECHO were 0. I'm treating this as a false positive driven by a stale test-file comment.
  • The robobun CI "failure" on 77974b9 was darwin-14-aarch64 expiring in the BuildKite queue (infrastructure), not a test failure; an empty retrigger commit (4911963) was pushed.
  • No CODEOWNERS-sensitive paths; wtf-bindings.cpp is glue code, not core JSC.

robobun added a commit that referenced this pull request May 18, 2026
Debug/ASAN builds fail with `use of undeclared identifier "assert"` in
`uv__tty_make_raw`. libc `<assert.h>` was reaching the TU transitively
through a WebKit header that the recent WebKit upgrade dropped.
`ASSERT` is the WTF-style macro already used elsewhere in this file
(see `uv_tty_reset_mode` below) and is in scope via WTF headers.

Drive-by for the same break tracked in #30988 / fixed in #30992 — this
PR needs the same one-liner so its debug lane can build.
robobun added a commit that referenced this pull request May 18, 2026
uv__tty_make_raw() called C assert() without including <cassert>.
Worked by accident when unified-source neighbors pulled the header
in transitively; breaks when the grouping changes. Use WTF's ASSERT
macro (already available via root.h) like the rest of the file.

Same fix as #30992; applied here to unblock the debug build.
robobun added a commit that referenced this pull request May 18, 2026
- wtf-bindings.cpp: assert -> ASSERT (same as #30992; #30705 dropped
  the transitive <cassert> include so debug builds fail to compile)
- semver.test.ts: 30s timeout on the 1e5-iteration memory-churn test
  and the subprocess regression test; both exceed the 5s default under
  debug+ASAN on constrained runners
Jarred-Sumner pushed a commit that referenced this pull request May 19, 2026
…ing `var;` (#31003)

Fixes #31002.

## Repro

```sh
$ bun -e "if(0)var[]"
panic: internal error: entered unreachable code (src/js_printer/lib.rs:2308:17)
Crashed while printing …/[eval]
```

`if (0) var []` / `if (0) var {}` — a destructuring `var` with zero
bindings inside a statically-dead `if` body — crashed the printer in
`print_decls` where `unreachable!()` guards against empty decl lists
("var;" is invalid syntax). `if(0)` is load-bearing in the reproducer:
non-dead branches ship the statement through to JSC, which rejects it
with a regular `SyntaxError`; the dead-branch path never reaches JSC.

## Cause

`scan_side_effects.rs::should_keep_stmt_in_dead_control_flow` (the DCE
helper that decides what to retain in `if (false) …`) handles `var` by
hoisting every identifier out of its destructuring pattern so scope
semantics are preserved:

```js
if (0) var [a, b] = expr();   // becomes: var a, b;  (value dropped, names hoisted)
```

For `var []` the destructuring pattern binds no identifiers, so the
hoisted vector is empty. The code then installed the empty vec as the
new decl list and returned `true`, telling the visitor to keep an
`S::Local` carrying zero decls. The next pass handed that to the
printer and tripped the invariant.

## Fix

`src/js_parser/scan/scan_side_effects.rs`: when the collected
identifier list is empty, return `false` and drop the statement
entirely — nothing to hoist and no valid `var` output exists. This is
symmetric with the existing "omit entirely" branches for
`S::Empty`/`S::Expr`/`S::Throw`/etc.

```diff
 let mut decls: Vec<G::Decl> = Vec::with_capacity(local.decls.len_u32() as usize);
 for i in 0..(local.decls.len_u32() as usize) {
     let binding = local.decls.at(i).binding;
     Self::find_identifiers(binding, &mut decls);
 }

+if decls.is_empty() {
+    return false;
+}
+
 local.decls = G::DeclList::move_from_list(decls);
 true
```

## Verification

```
$ bun bd -e 'if(0)var[]'
$ echo $?
0
$ bun bd -e 'if(0) var [a, b] = []; console.log(typeof a, typeof b);'
undefined undefined
```

New test at `test/regression/issue/31002.test.ts` runs each crash
repro in a subprocess and asserts `exitCode === 0` with no output,
plus a regression guard that destructuring `var`s with real
identifiers still hoist them as `undefined`.

Alive-path behavior is unchanged: `var []` / `var {}` at top level or
in truthy branches still reach JSC, which rejects them with the
expected "Expected an initializer in destructuring variable
declaration" SyntaxError.

## Note on debug-build compile error

The current debug build on `main` fails in
`src/jsc/bindings/wtf-bindings.cpp`
with `use of undeclared identifier 'assert'` (unrelated; tracked
upstream in #30988, fix already open in #30992). That is not in this
diff; rebasing after #30992 lands will unblock the debug lane.
Jarred-Sumner pushed a commit that referenced this pull request May 19, 2026
…#31010)

A version range with >=256 `||`/whitespace-separated comparators
panicked the **debug** build (`attempt to add with overflow`, exit 133)
where released Bun fails gracefully. Debug-only: Cargo's dev profile
enables `overflow-checks`; the release profile doesn't, so release
wrapped (256 -> 0) exactly like Zig's ReleaseFast.

`SemverQuery::parse` used `let mut count: u8 = 0;` with `count += 1;` —
the 256th increment overflows. `count` is only ever compared `== 0`,
never stored or cast, so a wider type is strictly more correct (it also
avoids Zig's silent u8 wrap, which was a latent bug that merely didn't
crash).

Widen `count` to `u32`. Regression test (`Bun.semver.satisfies` with 300
`||` comparators, run in a subprocess since the failure was an
uncatchable abort) passes on the debug build and matches released Bun.

---

Also carried:
- `wtf-bindings.cpp`: `assert` → `ASSERT` — identical to #30992; the
WebKit upgrade in #30705 dropped the transitive `<cassert>` include, so
debug builds currently fail to compile on `main`. Needed here so the
regression test can run under `bun bd`.
- 30s timeout on the pre-existing `failures does not cause weird memory
issues` test (1e5 iterations) and the new subprocess test — both exceed
the 5s default under debug+ASAN.

### Verification

```
$ bun bd test test/cli/install/semver.test.ts
 23 pass  0 fail
$ ./build/release/bun test test/cli/install/semver.test.ts
 23 pass  0 fail
```

With the `u32` change reverted, the new test fails on debug with `panic:
attempt to add with overflow (src/semver/SemverQuery.rs:981)` on stderr
and exit 132.

---------

Co-authored-by: robobun <117481402+robobun@users.noreply.github.com>
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.

bun fails to build wtf-bindings.cpp in debug after webkit upgrade

1 participant