Parent: #498; related: #468, #491. Discovered while qualifying #1085.
Executed reproduction
Node and forced tree-walker return [114,1]. Required bytecode with native execution enabled throws TypeError: null is not an object (evaluating 'caller.arguments[0]') on both the saved parent production binary and the #1085 cleanup binary:
var capturedLeaf;
var replaceCapture;
function makeLeaf() {
var captured = 1;
capturedLeaf = function(delta) { return captured + delta; };
replaceCapture = function(value) { captured = value; };
}
makeLeaf();
function caller(delta) { var result = capturedLeaf(delta); return result; }
for (var i = 0; i < 64; i++) caller(7);
var calls = 0;
replaceCapture({valueOf:function(){calls++;return caller.arguments[0]+100;}});
var result = caller(7);
JSON.stringify([result,calls]);The coercion callback must see the caller's active arguments object and execute once. The existing native safety classifier accepts a bounded numeric leaf containing a captured-local load while checking only incoming arguments and direct-data property access. A mutable captured value can become an object whose arithmetic conversion re-enters JavaScript, exposing the skipped caller activation. This classifier explanation is an inference from the executed failure and the current call path, to be verified by focused native-entry witnesses.
Required change
- Make activation elision conditional on a complete no-reentry proof for the callee's live inputs. Unknown or mutable captured state is not numeric merely because its bytecode participates in arithmetic.
- Audit the same proof for receiver property values, current arity, and inherited/observable access; execute each claimed failure before expanding scope.
- Retain exact caller/arguments identity, mapped parameters, coercion and exception order, steps, hooks, GC roots, and no-GIL behavior.
- Preserve genuinely safe numeric native entries. A guarded miss must occur before any observable effect and use ordinary activation execution.
Definition of done
- The executed reproduction matches Node under forced tree, required VM with JIT off/on, and explicitly exercised direct native entry.
- Positive numeric controls retain native hits; reentrant cases retain correct frames without duplicate effects.
- Focused Debug, ReleaseSafe, unsuppressed TSan, real-GC, and no-GIL coverage passes.
- Affected saved-parent/current corpus path sets and tree/VM outcomes are compared with nonzero denominators; scoped evidence is posted.