[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: lua 5.2 debug.traceback & stripped chunks
- From: "Ashwin Hirschi" <lua-l@...>
- Date: Sun, 30 Oct 2011 15:14:53 +0100
It looks like there's a problem in the Lua 5.2 beta when debug.traceback
encounters a chunk with its debug info stripped.
Here are the steps to reproduce it, using 2 simple scripts:
=== kick.lua ===
print "kick..."
dofile "start.lua"
=== start.lua ===
print "starting..."
print(debug.traceback())
print "done."
=== Scenario #1 : non-compiled ===
Running
lua kick.lua --> all's well
produces output:
kick...
starting...
stack traceback:
start.lua:3: in main chunk
[C]: in function 'dofile'
kick.lua:3: in main chunk
[C]: in ?
done.
=== Scenario #2 : compiled ===
Running
luac -o kick.lc kick.lua
lua kick.lc --> all's well
produces the exact same output as scenario 1.
=== Scenario #3 : compiled & stripped ===
Running
luac -s -o kick.lc kick.lua
lua kick.lc --> oops...
produces only:
kick...
starting...
and then aborts.
Can anyone confirm my findings? Thanks.
Ashwin.