FAILURE MAP
← Case archive

FA-90087 / Bytecode virtual machines / Member archive

Upvalues: closed upvalues lose their value · case 02

Closures read None from variables captured in a finished scope.

Member previewVariant 2 · 3 implementations · 7 checks per implementation

Case contract

A register/stack VM with open and closed upvalues. ["local", v] pushes a slot; ["set", s, v] and ["get", s] access slots; ["closure", id, [slots]] captures slots, reusing the existing open upvalue for a slot so closures share variables; ["uset"/"uget", id, k, (v)] access the k-th upvalue, going to the stack slot while open and to the upvalue's own cell once closed; ["close", level] closes every open upvalue whose slot >= level (copying the slot value) and truncates the stack to level. Accessing a vanished slot appends "dangling-slot" and stops.

Why this case matters

Closure capture and upvalue closing are subtle lifetime transitions in register-based VMs.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
open upvalue tracks later stack writes[7, 7, 0, 79, 0, 20, 6, null][7, 7, 0, 79, 0, 20, 6, 79]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗