The LuaStandalone engine holds an id=>function mapping for all the functions it returns to PHP, as happens for example every time a module is invoked. The functions in this mapping are never removed, even after PHP releases all references to the functions on its end. So if a module defines a lot of functions and is invoked many times in a page, it can easily run out the memory limit and cause the interpreter to exit.
LuaSandbox doesn't have this problem, as it does properly unreference the Lua functions when the PHP object is destroyed.
Version: master
Severity: normal