Skip to content

v0.9.0 — memory-safety & audio-callback hardening

Choose a tag to compare

@legendaryredfox legendaryredfox released this 06 Sep 23:53
· 13 commits to main since this release

Memory-safety and robustness release.

  • Array bindings: table→C-array reads are now GC-managed (lua_newuserdatauv), removing a leak on the Lua-error path, a missing-NULL crash on allocation failure, and a size_t→int truncation.
  • Use-after-free: resource structs are zeroed after Unload*, so reusing a released handle is a safe no-op. (__gc intentionally omitted due to shared ownership like mesh-in-model.)
  • Audio callbacks: NULL-state guard, callable-check, and pcall error handling (logged via TraceLog). Documented audio-thread caveat.
  • Data buffers: lua_tolstring (no NUL truncation) + get_data_buffer_checked bounds guard.
  • Build: -O2 -Wall -Wextra; fixed DecodeDataBase64 signedness (raylib 6.0 signature).
  • Tests: new tests/test_safety.lua; suite 248 passed, 0 failed.