Fix null deref in Bun.inspect when Proxy prototype trap throws#30225
Closed
robobun wants to merge 1 commit into
Closed
Fix null deref in Bun.inspect when Proxy prototype trap throws#30225robobun wants to merge 1 commit into
robobun wants to merge 1 commit into
Claude / Claude Code Review
completed
May 4, 2026 in 15m 45s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 1 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟣 Pre-existing | src/bun.js/bindings/bindings.cpp:5448-5453 |
Same getPrototype().getObject() null-deref pattern remains in napi.cpp (pre-existing) |
Annotations
Check notice on line 5453 in src/bun.js/bindings/bindings.cpp
claude / Claude Code Review
Same getPrototype().getObject() null-deref pattern remains in napi.cpp (pre-existing)
Heads-up (pre-existing, not introduced here): the same `getPrototype(globalObject).getObject()` pattern without an exception check still exists at `src/bun.js/bindings/napi.cpp:1837` in `napi_get_all_property_names`. A throwing Proxy `getPrototypeOf`/`getOwnPropertyDescriptor` trap on the prototype chain will cause the same null deref there when called with `napi_key_include_prototypes` + a descriptor filter — might be worth a follow-up since it's the identical bug class.
Loading