You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prior to this patch the dump of Lua stack top (or bottom if we consider
address growth direction) part was almost hardcoded except the number of
its free slots. This leads to the following drawbacks of <lj-stack>
command:
* Red zone stack slots are collapsed like the way similar to free stack
slots are except for the single difference: one needs to use <lj-tv>
to inspect them regardless the fact they are used or not.
* Top slot is hardcoded, that is confusing in case both base and top
point to a single slot (e.g. function call with no arguments given).
As a result of these changes red zone slots are dumped unconditionally
on the top of the stack dump and top slot is unwound like the occupied
slots are. The only artefact of the latter is the possible garbage
printed as the top slot value. One can find the new example of
<lj-stack> output below:
| (gdb) lj-stack L
| ----------- Red zone: 5 slots -----------
| 0x40047fc0 [ ] VALUE: nil
| 0x40047fb8 [ ] VALUE: nil
| 0x40047fb0 [ ] VALUE: nil
| 0x40047fa8 [ ] VALUE: nil
| 0x40047fa0 [ ] VALUE: nil
| ----------- Stack: 168 slots -----------
| 0x40047f98 [ M] VALUE: nil
| 0x40047ae0:0x40047f90 [ ] 151 slots: Free stack slots
| 0x40047ad8 [ BT ] VALUE: number 2.3873123941281106e-313
| 0x40047ad0 [ ] FRAME: [PP] delta=1, fast function LuaJIT#27
| 0x40047ac8 [ ] FRAME: [L] delta=7, fast function LuaJIT#20
| 0x40047ac0 [ ] VALUE: Lua function @ 0x400c00b0, 2 upvalues, "@builtin/box/console.lua":243
| 0x40047ab8 [ ] VALUE: nil
| 0x40047ab0 [ ] VALUE: Lua function @ 0x4014bb78, 0 upvalues, "return collectgarbage()":0
| 0x40047aa8 [ ] VALUE: nil
| 0x40047aa0 [ ] VALUE: string "collectgarbage()" @ 0x40116660
| 0x40047a98 [ ] VALUE: table @ 0x400c0f88 (asize: 0, hmask: 0x1)
| 0x40047a90 [ ] FRAME: [LP] delta=3, Lua function @ 0x4014fe30, 3 upvalues, "@builtin/box/console.lua":379
| 0x40047a88 [ ] VALUE: string "collectgarbage()" @ 0x40116660
| 0x40047a80 [ ] VALUE: table @ 0x400c0f88 (asize: 0, hmask: 0x1)
| 0x40047a78 [ ] FRAME: [L] delta=3, Lua function @ 0x40075aa8, 1 upvalues, "@builtin/box/console.lua":701
| 0x40047a70 [ ] VALUE: string "/home/imun" @ 0x400ff388
| 0x40047a68 [ ] VALUE: table @ 0x400c0f88 (asize: 0, hmask: 0x1)
| 0x40047a60 [ ] FRAME: [CP] delta=1, Lua function @ 0x4014d0c8, 5 upvalues, "@builtin/box/console.lua":746
| 0x40047a58 [S ] FRAME: dummy L
Reviewed-by: Sergey Kaplun <skaplun@tarantool.org>
Reviewed-by: Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Signed-off-by: Igor Munkin <imun@tarantool.org>
0 commit comments