Repository navigation
Conversation
When walking the prototype chain in JSC__JSValue__forEachPropertyImpl, getPrototype() can throw (e.g. from a Proxy getPrototypeOf trap) and return an empty JSValue. Calling .getObject() on that empty value dereferences a null JSCell. Handle the empty value and clear the exception, matching how the fast path in the same function already handles this case.
|
Updated 7:41 AM PT - Apr 15th, 2026
❌ @robobun, your commit c23b18a has 3 failures in
🧪 To try this PR locally: bunx bun-pr 29344That installs a local version of the PR into your bun-29344 --bun |
|
This PR may be a duplicate of:
🤖 Generated with Claude Code |
|
Duplicate of #28325 (and several others). Closing in favor of the earliest open PR. |
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughModified prototype-chain traversal in bindings to handle exceptions from Proxy Changes
🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
LGTM — straightforward null-check fix matching the existing fast-path pattern, with a regression test.
Extended reasoning...
Overview
The PR modifies in (slow path prototype-chain walk) and adds a crash-reproduction test to .
The Fix
The slow path was calling in a single expression. If the Proxy trap throws, returns an empty ; calling on an empty value dereferences a null , causing a segfault.
The fix splits the call, clears any pending exception with , and guards behind a truthiness check — exactly the same pattern already used on the fast path (and in two other nearby calls in the same function).
Security Risks
None. The fix makes exception handling more defensive; it cannot introduce new attack surface.
Level of Scrutiny
Low. This is a one-liner logic fix with a clear root cause, an obvious correct fix, a pre-existing identical pattern to follow, and a test. The changed code is in the inspect/property-enumeration path, not in auth, crypto, or IPC.
Other Factors
No bugs were found by the automated system. The test suite fixture pattern is consistent with how other crash-regression tests are written in the same file. The commit has already landed on (c23b18a).
Inspecting an object whose prototype chain contains a Proxy with a throwing
getPrototypeOftrap would crash with a null pointer dereference.In
JSC__JSValue__forEachPropertyImpl, when walking the prototype chain on the slow path,getPrototype()can throw and return an emptyJSValue. Calling.getObject()on an empty value dereferences a nullJSCell.The fast path in the same function already handles this case by checking the return value and clearing the exception. This applies the same handling to the slow path.
Found by Fuzzilli.