Fix null deref in Bun.inspect when Proxy getPrototypeOf trap throws - #30517
Closed
robobun wants to merge 1 commit into
Closed
Fix null deref in Bun.inspect when Proxy getPrototypeOf trap throws#30517robobun wants to merge 1 commit into
robobun wants to merge 1 commit into
Claude / Claude Code Review
completed
May 11, 2026 in 15m 30s
Code review found 1 potential issue
Found 2 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/jsc/bindings/bindings.cpp:5447-5450 |
Same null-deref pattern remains in napi.cpp |
Annotations
Check notice on line 5450 in src/jsc/bindings/bindings.cpp
claude / Claude Code Review
Same null-deref pattern remains in napi.cpp
Heads-up: the same unsafe pattern exists at `src/jsc/bindings/napi.cpp:1837` in `napi_get_all_property_names` — `current_object->getPrototype(globalObject).getObject()` with no exception check, so a Proxy `getPrototypeOf` trap that throws will null-deref there too. This is pre-existing and not touched by this PR, but since a grep for `getPrototype(globalObject).getObject()` finds it, you may want to apply the same `CLEAR_IF_EXCEPTION` + empty-check fix there in this PR or a follow-up. Non-blocki
Loading