[Tarantool-patches] [PATCH luajit] FFI: Add tonumber() specialization for failed conversions.
Sergey Kaplun
skaplun at tarantool.org
Wed Sep 21 15:03:15 MSK 2022
Hi, Sergos!
Thanks for the review!
On 20.09.22, sergos wrote:
> First of all:
>
> s.ostanevich at s-ostanevich2:~/workspaces/t.sergos % uname -a
> Darwin s-ostanevich2 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64 x86_64
>
> Then I just built Tarantool with ninja:
I tried run the test suite with ninja, but it's failed:
| $ ninja -C build tarantool-tests
| ...
| /home/burii/builds_workspace/tarantool/master/third_party/luajit/test/tarantool-tests/lj-408.test.lua ......................................
| not ok - recorded with NULL and converted for 0LL
| Dubious, test returned 1 (wstat 256, 0x100)
| Failed 1/4 subtests
|...
| ninja: build stopped: subcommand failed.
>
> Tarantool 2.11.0-entrypoint-494-gdc147ec91
> Target: Darwin-x86_64-debug
>
> Then I brought the test as a patch from the mail and run ninja test.
May you check the test output running without ninja like the follwing,
please:
| $ ../src/tarantool app-tap/lj-408-tonumber-cdata-record.test.lua
| TAP version 13
| 1..4
| ok - recorded with NULL and not converted for NULL
| not ok - recorded with NULL and converted for 0LL
| ---
| filename: app-tap/lj-408-tonumber-cdata-record.test.lua
| line: 0
| trace:
| - line: 0
| source: '@app-tap/lj-408-tonumber-cdata-record.test.lua'
| filename: app-tap/lj-408-tonumber-cdata-record.test.lua
| what: main
| namewhat:
| src: app-tap/lj-408-tonumber-cdata-record.test.lua
| ...
| ok - recorded with 0LL and converted for 0LL
| ok - recorded with 0LL and not converted for NULL
| # failed subtest: 1
Also, please, check `jit.dump()` output. Maybe there is not trace for
some reason.
You can run the following command:
| $ ../src/tarantool -e 'require"jit.dump".start("ib")' app-tap/lj-408-tonumber-cdata-record.test.lua
The start of output should be the following without the patch.
| 1..4
| ---- TRACE 1 start lj-408-tonumber-cdata-record.test.lua:17
| 0001 GGET 1 0 ; "tonumber"
| 0002 MOV 2 0
| 0003 CALL 1 2 2
| 0000 . FUNCC ; tonumber
| 0004 RET1 1 2
| ---- TRACE 1 IR
| 0001 fun SLOAD #0 R
| 0002 tab FLOAD 0001 func.env
| 0003 int FLOAD 0002 tab.hmask
| 0004 > int EQ 0003 +63
| 0005 p32 FLOAD 0002 tab.node
| 0006 > p32 HREFK 0005 "tonumber" @8
| 0007 > fun HLOAD 0006
| 0008 > cdt SLOAD #1 T
| 0009 > fun EQ 0007 tonumber
| ---- TRACE 1 stop -> return
| ...
>
> The output says the test passes, while sources contains no patch. Am I missing something?
>
> Sergos
>
<snipped>
> >
>
--
Best regards,
Sergey Kaplun
More information about the Tarantool-patches
mailing list