JAB-034: the ULOG handle is a bare pointer-as-Number — no finalizer, no ownership, no guard

Now
OPEN
Sev
MED
Ask
gritzko
Env
webkitgtk-4.1 JSC C API, jab/ulog.hpp
Rev
///jab#8335085b
Rep
///jab
See
JAB-033

_ulog_open heap-boxes a booked mmap plus its wh128 sidecar and hands the raw pointer to JS as a *Number*. A Number owns nothing: drop it and the mapping, its fd and the sidecar leak for the life of the process — GC cannot reclaim what it was never told about. The reverse cast is unguarded too, so any JS number reaches raw memory. Found while measuring JAB-033; today's two callers happen to close correctly, so this is a LATENT defect of the binding contract, not a live leak.

Input

Context

Read-only inspection of ///jab#8335085b on 2026-08-05, out of the JAB-033 measurement pass; the mmap side of the same question is ABC-020.

Goals

The handle OWNS its resources: dropping it on the floor is reclaimable, and a bogus value never reaches raw memory.

Constraints

WIP

Design decisions

TODOs

Blockers and bummers

Outcome