q66 / cffi-lua

A portable C FFI for Lua 5.1+
MIT License
176 stars 24 forks source link

ensure no stack values with destructors are present in OOM scenarios #22

Open q66 opened 3 years ago

q66 commented 3 years ago

in the very rare case that lua OOMs and raises a panic case, we should ensure that no stack values (which could be managing heap pointers) with destructors are present, to avoid leaking memory or causing any state to go inconsistent

this specifically only affects places where lua APIs are called