src/registry.c: akgl_registry_load_properties fixtures, and assert the loop leaks no strings #72

Closed
opened 2026-08-02 18:35:17 -04:00 by tachikoma · 1 comment
Collaborator

Source: TODO.md, "Remaining work" -> "Does not need a renderer" (at bbb7b8f)

akgl_registry_load_properties needs a fixture with a properties object, plus
the missing-file, missing-key and wrong-value-type cases. src/registry.c is at
75% line coverage.

Assert the loop at src/registry.c:175-185 does not leak the string heap.
That assertion is not hypothetical: the per-property CLEANUP block is empty and
the release is the last statement inside the ATTEMPT, so a malformed property
leaks a pool slot -- filed separately as its own defect. Write the coverage and
the leak assertion together and the defect has a test the day it is fixed.

Files: tests/registry.c, src/registry.c:175-185


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

**Source:** TODO.md, "Remaining work" -> "Does not need a renderer" (at bbb7b8f) `akgl_registry_load_properties` needs a fixture with a `properties` object, plus the missing-file, missing-key and wrong-value-type cases. `src/registry.c` is at 75% line coverage. **Assert the loop at `src/registry.c:175-185` does not leak the string heap.** That assertion is not hypothetical: the per-property `CLEANUP` block is empty and the release is the last statement inside the `ATTEMPT`, so a malformed property leaks a pool slot -- filed separately as its own defect. Write the coverage and the leak assertion together and the defect has a test the day it is fixed. **Files:** `tests/registry.c`, `src/registry.c:175-185` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 0.9.x milestone 2026-08-02 18:35:17 -04:00
tachikoma added the test-coverageblast-radius:medium labels 2026-08-02 18:35:17 -04:00
Author
Collaborator

Duplicate of #12, filed twice by a paging bug in the script that created these -- the forge caps an issue listing at 50 per page and the de-duplication check read only the first page. Closing; #12 is the live one.

Duplicate of #12, filed twice by a paging bug in the script that created these -- the forge caps an issue listing at 50 per page and the de-duplication check read only the first page. Closing; #12 is the live one.
Sign in to join this conversation.