Fix null deref in Bun.inspect when Proxy prototype traps throw#30030
Closed
robobun wants to merge 1 commit into
Closed
Fix null deref in Bun.inspect when Proxy prototype traps throw#30030robobun wants to merge 1 commit into
robobun wants to merge 1 commit into
Claude / Claude Code Review
completed
May 1, 2026 in 18m 0s
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:5364-5370 |
Same getPrototype().getObject() null-deref pattern exists in napi.cpp |
Annotations
Check notice on line 5370 in src/bun.js/bindings/bindings.cpp
claude / Claude Code Review
Same getPrototype().getObject() null-deref pattern exists in napi.cpp
Heads up (pre-existing, not introduced by this PR): the same `getPrototype(globalObject).getObject()` null-deref pattern fixed here also exists at `src/bun.js/bindings/napi.cpp:1837` inside `napi_get_all_property_names`. A native addon calling that API with `napi_key_include_prototypes` + an enumerable/writable/configurable filter on an object whose prototype chain has a Proxy with a throwing `getPrototypeOf` (or `getOwnPropertyDescriptor`) trap will crash the same way. Might be worth applying t
Loading