lunum icon indicating copy to clipboard operation
lunum copied to clipboard

__gc not called on Redhat

Open jzrake opened this issue 13 years ago • 2 comments

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

jzrake avatar Jan 29 '12 15:01 jzrake

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.

jzrake avatar Jan 29 '12 16:01 jzrake

The same bug appears on some Mac OS 10.6 systems (GHL's laptop).

jzrake avatar Jan 30 '12 21:01 jzrake