IGNORE() logs a context and never releases it #3

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

Source: TODO.md §1.2 (at 669b2b3)

deps/libakerror/include/akerror.tmpl.h:308. The macro assigns the context to
__akerr_last_ignored, logs it, and stops. The slot is never returned to the
pool
, so every IGNORE() on a failing call leaks one -- and after
AKERR_MAX_ARRAY_ERROR of them the pool is exhausted and ENSURE_ERROR_READY
calls exit(1).

Consequence here. aksl_tree_iterate's CLEANUP block (src/stdlib.c)
cannot use IGNORE() to drop a queue-drain failure and open-codes the
log-then-release by hand instead, with a comment saying why. It is four lines
that should be one.

What closing it would touch. One RELEASE_ERROR in the macro; then delete the
workaround here.

Not fixable from inside this repository.

Files: deps/libakerror/include/akerror.tmpl.h:308, src/stdlib.c


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

**Source:** TODO.md §1.2 (at 669b2b3) `deps/libakerror/include/akerror.tmpl.h:308`. The macro assigns the context to `__akerr_last_ignored`, logs it, and stops. **The slot is never returned to the pool**, so every `IGNORE()` on a failing call leaks one -- and after `AKERR_MAX_ARRAY_ERROR` of them the pool is exhausted and `ENSURE_ERROR_READY` calls `exit(1)`. **Consequence here.** `aksl_tree_iterate`'s `CLEANUP` block (`src/stdlib.c`) cannot use `IGNORE()` to drop a queue-drain failure and open-codes the log-then-release by hand instead, with a comment saying why. **It is four lines that should be one.** **What closing it would touch.** One `RELEASE_ERROR` in the macro; then delete the workaround here. Not fixable from inside this repository. **Files:** `deps/libakerror/include/akerror.tmpl.h:308`, `src/stdlib.c` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 0.3.0 milestone 2026-08-02 18:53:16 -04:00
tachikoma added the defectblast-radius:mediumstatus::grooming labels 2026-08-02 18:53:16 -04:00
Sign in to join this conversation.