You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SIGSEGV: Array.from() over a Proxy wrapping an array (spread and for…of work) #10270
Array.from(p) where p is a Proxy wrapping an array segfaults (SIGSEGV, exit 139). Spreading and for…of over the same proxy work, so the value is iterable; only Array.from crashes. Found while chasing OpenCode's request path (tracker #10107).
bun 1.3.14 prints Q5 Array.from(proxyOverArray) 1 and continues.
Notes
Array.isArray returns true for the proxy, so any code path that branches on it and then takes an array-specific fast path will dereference the proxy id as if it were an ArrayHeader. That is the likely shape of the crash; js_for_of_to_array on such a value is reachable from the Headers constructor too (new Headers(new Proxy([["a","1"]], {}))), which is how I found it.
A crash rather than a TypeError makes this worse than a plain correctness gap: it takes the whole process down with no JS-level stack.
Related: the Headers record-init proxy gap I am fixing separately, and tracker #10107.
The exact compiled reproduction now reaches Q5 and matches bun. The new regression test exits 139 on pristine 1cd160f3d and passes with the fix. The PR documents the raw GC-header probe in the unmapped clone path, the IsArray-trusting mapped path, sibling fixes/audit, and before/after benchmarks (+0.20% for plain-array Array.from, within measured variation). It also fixes #10274 and references #10107. The unrelated runtime-suite failure reproduced on main is documented in validation.
Activity
proggeramlug commentedon Sep 15, 2026
Ready-for-review fix: #10280
The exact compiled reproduction now reaches Q5 and matches bun. The new regression test exits 139 on pristine
1cd160f3dand passes with the fix. The PR documents the raw GC-header probe in the unmapped clone path, the IsArray-trusting mapped path, sibling fixes/audit, and before/after benchmarks (+0.20% for plain-array Array.from, within measured variation). It also fixes #10274 and references #10107. The unrelated runtime-suite failure reproduced on main is documented in validation.