Skip to content

[autofix.ci] apply automated fixes

7eb3fb5
Select commit
Loading
Failed to load commit list.
Merged

deps: bump mimalloc to dev3 (bun-dev3-v2) #29251

[autofix.ci] apply automated fixes
7eb3fb5
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Apr 13, 2026 in 16m 0s

Code review found 3 potential issues

Found 5 candidates, confirmed 3. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/js/bun/jsc/heapStats-mimalloc.test.ts:39-44 heapStats dump:blocks test accesses main.blocks without guarding main is defined
🟡 Nit src/bun.js/modules/BunJSCModule.h:358-387 Two issues in new heapStats dump code: missing null fallback and missing exception handling

Annotations

Check warning on line 44 in test/js/bun/jsc/heapStats-mimalloc.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

heapStats dump:blocks test accesses main.blocks without guarding main is defined

The 'heapStats({dump: "blocks"})' test accesses `main.blocks` without first asserting `main` is defined, unlike the parallel 'dump: true' test which correctly guards with `expect(main).toBeDefined()`. If `heaps.find(h => h.seq === 0)` returns `undefined` for any reason, the test will throw a `TypeError: Cannot read properties of undefined (reading 'blocks')` instead of a descriptive assertion failure.

Check warning on line 387 in src/bun.js/modules/BunJSCModule.h

See this annotation in the file changed.

@claude claude / Claude Code Review

Two issues in new heapStats dump code: missing null fallback and missing exception handling

The new heapStats dump section in `functionMemoryUsageStatistics` has two issues: (1) `mi_stats_get_json` returning null silently omits the `mimalloc` property entirely, breaking the stable shape callers expect — it should always emit `jsNull()` as a fallback; (2) the dump section calls `arg0.getObject()->get()` and `dump.toBoolean()` — both can throw via Proxy traps or `Symbol.toPrimitive` — but the function has no `DECLARE_THROW_SCOPE` and no `RETURN_IF_EXCEPTION` guards, so a pending JS excep