Skip to content

vm.h operand-width comments are stale: OP_INTERROGATE / OP_PREDICATE annotated [kind:8] but vm.c reads u16 #958

Description

@InauguralPhysicist

At v0.39.0, src/vm.h annotates OP_INTERROGATE [kind:8] and OP_PREDICATE [kind:8] (lines ~141-142) while vm.c reads both operands with read_u16 (vm.c:4878, 5220).

This is process-critical for ouroboros: after the v0.33.0 OP_LINE 16→32 incident (#630), ouroboros's mandated pin-bump audit is "diff src/vm.h's enum comments for operand-width changes" — and the instrument demonstrably lies on these two opcodes (a mirror written from the comments would emit u8 and desync the stream). Operand width is ABI with no number-guard; the comments are the only declared source of truth.

Fix either way: correct the two comments, or (better) add a width table/static assertion tying the enum comments to the read_u8/read_u16/read_u32 sites so they cannot drift again. Found during the 2026-08-16 ouroboros adversarial review (ouroboros#99/#100 context).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions