gittup/tup — pull request #115 by Rendaw (2013-05-11 09:38:47+00:00)
Title: Strengthen parse_lua_tupfile against Lua-internal errors

If debug is overwritten with a non-table then lua_getfield would error out and Lua would jump up the stack to the lua_pcall where the offending file was processed. I tried it on Arch and Ubuntu 12.10 and on both Lua would enter an uninterruptible sleep - I couldn't kill them or (on Ubuntu) shut down the computer.

My theory is that the jump skipped some critical fuse resource unlock step. I basically hardened the code so I think Lua won't error out now. I don't think this can occur elsewhere since parse_lua_tupfile is the only function where non-Lua Tup code is sandwitched between Lua code in the stack.

Tupfile.lua:
```lua
_G.debug = false
tup.include 'test.lua'
```
test.lua:
```
```

I just noticed I also changed the pcall to use 0 instead of LUA_MULTRET for the number of return values. It should make the stack state more deterministic, but it is unrelated to this fix.