[Tarantool-patches] [PATCH luajit] Fix debug.debug() for non-string errors.

Sergey Kaplun skaplun at tarantool.org
Wed Jun 22 11:24:31 MSK 2022


Hi, Sergos!

Thanks for the review!

On 21.06.22, sergos wrote:
> Hi!
> 
> Thanks for the patch!
> 
> It’s strange, but Tarantool happens to handle this case correctly?

Not for me:).

| $ echo 'error({}); print(42)' | ./src/tarantool -e 'debug.debug()'
| lua_debug> Segmentation fault
| ...
| #5  0x55a6323a6b84 in lj_cf_debug_debug+ef
| #6  0x55a63236b66f in lj_BC_FUNCC+34
| #7  0x55a63237687b in lua_pcall+379
| #8  0x55a632305317 in luaT_call+29
| #9  0x55a6322fd8b7 in run_script_f+427
| #10 0x55a6320f496e in _ZL16fiber_cxx_invokePFiP13__va_list_tagES0_+1e
| #11 0x55a63232b3f0 in fiber_loop+8d
| #12 0x55a632686716 in coro_init+4c

May be you should build it with debug?

| $ src/tarantool -v
| Tarantool 2.10.0-beta2-6-g634f59c7f
| Target: Linux-x86_64-Debug
| Build options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BACKTRACE=ON

P.S. I use not the latest Tarantool as far as there is no related
patches (AFAIK).

> 
> % echo 'error({}); print(42)' | ./src/tarantool -e 'debug.debug()' 
> lua_debug> (null)
> lua_debug> %                                                                                                                                                                                                                                                              % echo $?
> 0
> 
> Surely, with the patch applied I see the following, as expected:
> 
> % echo 'error({}); print(42)' | ./src/tarantool -e 'debug.debug()'
> lua_debug> (error object is not a string)
> lua_debug> %                                                                                                                                                                                                                                                              % 
> 
> 
> Is it relevant at all?
> 
> regards,
> Sergos
> 
> 
> > On 30 Dec 2021, at 14:45, Sergey Kaplun <skaplun at tarantool.org> wrote:
> > 

<snipped>

> 

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list