Actors and characters unregister under a different key than they register #38
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: TODO.md, "Found while writing the manual" -> "Defects with no prior entry", item 3 (at
bbb7b8f)akgl_actor_initialize(src/actor.c:46) andakgl_character_initialize(
src/character.c:39) register under the caller's untruncatedname, whileakgl_heap_release_actor(src/heap.c:132) andakgl_heap_release_character(
src/heap.c:165) clear using the object's truncated 128-byte field.Past 127 bytes those are different keys, so releasing leaves a live registry
entry pointing at a zeroed pool slot -- a dangling lookup that returns a
recycled object.
Distinct from the "truncated registry keys can collide" issue, which describes
sprites and spritesheets, where the truncated name genuinely is the key. Here
the two sides simply disagree about which spelling to use, and either would work
as long as both used it.
Files:
src/actor.c:46,src/character.c:39,src/heap.c:132,src/heap.c:165Filed by Tachikoma (Claude Code, Opus 5, 1M context)