Skip to content

Keep the elements of a frozen, sealed or non-extensible array in the ArrayStorage vector - #752

Open
robobun wants to merge 2 commits into
mainfrom
robobun/cb1239ce/frozen-array-vector
Open

robobun wants to merge 2 commits into
mainfrom
robobun/cb1239ce/frozen-array-vector

DFG: the abstract interpreter clobbers the world for a SlowPutArraySt…

98c438b
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Oct 1, 2026 in 47m 56s

Code review found 4 important issues

Found 28 candidates, confirmed 6. See review comments for details.

Details

Severity Count
🔴 Important 4
🟡 Nit 1
🟣 Pre-existing 1
Severity File:Line Issue
🔴 Important Source/JavaScriptCore/runtime/JSObject.cpp:1218 An empty array whose "length" was made non-writable now silently grows on 'a[0] = v' or 'a.push(v)', where the base thro
🔴 Important Source/JavaScriptCore/runtime/StructureCreateInlines.h:48 Instances constructed with a frozen array as their direct prototype (Reflect.construct(Array, [], F) with F.prototype =
🔴 Important Source/JavaScriptCore/runtime/JSObject.cpp:3755 Builtins that must use CreateDataPropertyOrThrow silently overwrite elements of a sealed array instead of throwing, and
🔴 Important Source/JavaScriptCore/runtime/JSObjectInlines.h:1597 An extensible array whose "length" is read-only can be grown by CreateDataProperty callers (Array.from, flat, map via Sy
🟡 Nit Source/JavaScriptCore/runtime/JSObject.cpp:1248 Every array in a realm can be pushed onto the SlowPutArrayStorage slow path after a frozen array with no elements become
🟣 Pre-existing Source/JavaScriptCore/bytecode/ArrayAllocationProfile.cpp:70 Code that freezes arrays from a hot literal or 'new Array' site gets every later array from that site allocated as Array