writeonce/compiler/src
shoney.arickathil 9eb8baef9f fix(compiler): storing an owned value in a container is a MOVE
The disclosed "move-on-push" gap detonated on iteration 16's route-table
pattern: `push(self.routes, r)` moved the Route into the container while the
`take r` parameter's scope-end DROP still fired — the container's own drop
plan (multi_free) then freed the element a second time. ASan: SEGV in
class_free during trap unwind; latent until now because pushed elements were
Texts, which copy at the boundary (2026-08-14).

owner.ml analyze_call: `push`'s value slot and `set`'s key/value slots now
TRANSFER an Owned, non-copy-stored place (record_move, exactly the take-arg
shape), so the pusher's drop disappears. Text/json.Value keep the copy-store
path (stores_by_copy) and the caller still drops the fresh copy. Traced (gc)
values remain exempt (tracing owns them). A user-declared push/set fn of the
same name wins, per the builtin shadowing rule.

Pinned by tests/corpus/run/container-owned-move (route table: interface-
typed field values pushed via take params, dispatched by ICALL, mixed with
Text pushes) — the exact iteration-16 shape, ASan-clean.

Verified: woc-test 540/0; oop-e2e 88/0; log-watcher 7/0; employee 8/0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 19:36:49 +02:00
..
ast.ml feat(compiler): update-through-row + delete statement (9b cont.) 2026-08-16 05:24:58 +02:00
CODE-LOGIC.md docs: CODE-LOGIC files reflect the 7b collector and inference pass 2026-08-19 17:12:52 +02:00
diag.ml feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00
disasm.ml feat: retire RC from the emitter and the format — .wob v4 (7b Phase 3b) 2026-08-19 17:07:43 +02:00
dump.ml feat: retire RC from the emitter and the format — .wob v4 (7b Phase 3b) 2026-08-19 17:07:43 +02:00
dune refactor(compiler): inference is one library pass, Gcinfer.infer 2026-08-18 19:00:11 +02:00
emit.ml feat(woc): dependency resolver + multi-root builds (iter 15 Tasks 2+3) 2026-08-19 19:19:57 +02:00
gcinfer.ml fix(compiler): demand promotion targets the escaping projection's class 2026-08-18 19:07:10 +02:00
lexer.ml fix: net.Conn is a scalar, \r escape, map[k] is optional, interp node ids 2026-08-14 17:47:45 +02:00
owner.ml fix(compiler): storing an owned value in a container is a MOVE 2026-08-19 19:36:49 +02:00
parser.ml feat(compiler): doctrine reject rows — WO-E105 (iter 5 strictness) 2026-08-19 17:57:36 +02:00
token.ml feat: json encode/decode + as, .wob v2 class metadata — log-watcher compiles 2026-08-14 17:08:46 +02:00
types.ml feat(compiler): doctrine reject rows — WO-E105 (iter 5 strictness) 2026-08-19 17:57:36 +02:00