LuaJIT FFI type specialization persists after module reload — how to safely invalidate stale ctype caches
Stale FFI type specialization after reloading a LuaJIT module I am working with LuaJIT's FFI and have run into a design question around type-specialization caching. When a module is reloaded via require (for example after redefining a C struct layout), the recorded type specialization appears to persist, so conversions may still follow the old struct layout.