When compiling rlua with the system-luajit feature, the Lua struct does not properly free its memory when it goes out of scope. This does not occur with other Lua implementations such as system-lua54.
Reproducible example
use rlua::Lua;
fn main() {
loop {
Lua::new();
}
}
With system-luajit enabled, this example will cause the system to run out of memory.
Bug description
When compiling rlua with the
system-luajit
feature, theLua
struct does not properly free its memory when it goes out of scope. This does not occur with other Lua implementations such assystem-lua54
.Reproducible example
With
system-luajit
enabled, this example will cause the system to run out of memory.System information
OpenBSD bsd.lan 7.4 GENERIC.MP#1397 amd64