gittup/tup

tup aborts on nested lua file error

jp-embedded opened this issue · 0 comments

The attached project makes tup abort.

$ ../tup-v0.8/tup 
[ tup ] [0.000s] Scanning filesystem...
[ tup ] [0.000s] Reading in new environment variables...
[ tup ] [0.000s] Parsing Tupfiles...
 2) [0.001s] .
 [   ]  33%tup: luaparser.c:852: parse_lua_tupfile: Assertion `lua_gettop(gls) == 0' failed.
Aborted (core dumped)

It seems to me that parse_lua_tupfile() is invoked recursively and thus the assert should compare with what lua_gettop() would return at start of parse_lua_tupfile() instead of 0

tup-assert-test.tar.gz