> - I thinks the code in ldump is buggy. ldump.c does unlock before calling the user-supplied writer function. lundump.c does the same (in luaZ_fill). Every time you enter userland you need to unlock; it's like a Lua API function returning.