Skip to content

napi: tolerate pending VM exception in napi_create_string_* (debug/asan abort) - #36091

Closed
robobun wants to merge 3 commits into
mainfrom
farm/e2821ddc/napi-create-string-pending-exception
Closed

napi: tolerate pending VM exception in napi_create_string_* (debug/asan abort)#36091
robobun wants to merge 3 commits into
mainfrom
farm/e2821ddc/napi-create-string-pending-exception

napi: tolerate pending VM exception in napi_create_string_* (debug/as…

79d4b41
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 27, 2026 in 19m 27s

Code review found 1 important issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/runtime/napi/napi_body.rs:659-665 napi_create_array{,_with_length} share the same abort path but are not fixed

Annotations

Check failure on line 665 in src/runtime/napi/napi_body.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

napi_create_array{,_with_length} share the same abort path but are not fixed

`napi_create_array` and `napi_create_array_with_length` (napi_body.rs:530-571) share the identical abort path this PR fixes: `get_env!` (no pending-exception gate) → `JSValue::create_empty_array` → `call_zero_is_throw` → `ExceptionValidationScope::assert_exception_presence_matches(false)` → `releaseAssertNoException` → SIGABRT in debug/asan when a VM exception is already pending. Per REVIEW.md's whole-class rule, either route these through the same `SuspendExceptionScope` treatment (e.g. a `napi