lunum
lunum copied to clipboard
__gc not called on Redhat
Memory leaks are reported by valgrind on Redhat, having the same size as allocated arrays. It turns out that the __gc metamethod is not being called. Compile flags are:
export CFLAGS = -Wall -O2 -fPIC export SO = $(CC) -O -shared
This bug had nothing to do with lunar, or the build procedure. In fact, it's a bug in Lua 5.1.4 on Redhat that seems not to be reported. It can be reproduced easily in pure Lua, where an object's __gc metamethod is never called. This bug does not appear in Lua 5.2.0.
The same bug appears on some Mac OS 10.6 systems (GHL's laptop).