Hello!
The commit a4762b6ffe74f5878882ef238d37bfa92d90e418 ("'objsize' returns 'l_mem'") has introduced regression - an assertion is triggered in a function lgc.c:freeobj().
How to reproduce:
Enable compilation flag LUAI_ASSERT:
--- a/makefile
+++ b/makefile
@@ -71,7 +71,7 @@ LOCAL = $(TESTS) $(CWARNS)
# To enable Linux goodies, -DLUA_USE_LINUX
# For C89, "-std=c89 -DLUA_USE_C89"
# Note that Linux/Posix options are not compatible with C89
-MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX
+MYCFLAGS= -DLUAI_ASSERT $(LOCAL) -std=c99 -DLUA_USE_LINUX
MYLDFLAGS= $(LOCAL) -Wl,-E
MYLIBS= -ldl
Build Lua by executing make and run:
$ ./lua -e "
> local function func() func() end
> coroutine.resume(coroutine.create(func))"
lua: lgc.c:861: void freeobj(lua_State *, GCObject *): Assertion `(((L->l_G))->GCtotalbytes - ((L->l_G))->GCdebt) == newmem' failed.
Aborted (core dumped)
Sergey