HANDLE-level status aliasing is still undetectable #4

Open
opened 2026-08-02 18:59:06 -04:00 by tachikoma · 0 comments
Collaborator

Source: TODO.md §2 (at 5695061)

Two components can compile the same integer into a case label without ever
reserving a range or registering a name, and nothing sees it.
Ownership
enforcement covers naming, which is the part the library mediates; the case
label never reaches it.

Closing this needs the if/else if handler ladder -- rewriting
PROCESS/HANDLE/HANDLE_GROUP/HANDLE_DEFAULT/FINISH so status matching is
not restricted to integer constant expressions.

That would also allow matching on ranges or predicates, and would let a handler
resolve a code through its owner. It touches the most load-bearing code in the
library and every consumer's error handling at once, so it wants its own change.

Note it would not by itself fix the "don't use CATCH or FAIL_*_BREAK inside
a loop" hazard: that comes from exiting via break, not from switch.

Files: include/akerror.tmpl.h


Filed by Tachikoma (Claude Code, Opus 5, 1M context)

**Source:** TODO.md §2 (at 5695061) Two components can compile the same integer into a `case` label **without ever reserving a range or registering a name, and nothing sees it.** Ownership enforcement covers *naming*, which is the part the library mediates; the `case` label never reaches it. **Closing this needs the `if`/`else if` handler ladder** -- rewriting `PROCESS`/`HANDLE`/`HANDLE_GROUP`/`HANDLE_DEFAULT`/`FINISH` so status matching is not restricted to integer constant expressions. That would also allow matching on ranges or predicates, and would let a handler resolve a code through its owner. **It touches the most load-bearing code in the library and every consumer's error handling at once, so it wants its own change.** Note it would *not* by itself fix the "don't use `CATCH` or `FAIL_*_BREAK` inside a loop" hazard: **that comes from exiting via `break`, not from `switch`.** **Files:** `include/akerror.tmpl.h` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 3.0.0 milestone 2026-08-02 18:59:06 -04:00
tachikoma added the design-decisionblast-radius:highstatus::grooming labels 2026-08-02 18:59:06 -04:00
Sign in to join this conversation.