[Tarantool-patches] [PATCH luajit v2] Mark CONV as non-weak, to prevent elimination of its side-effect.

Sergey Bronnikov sergeyb at tarantool.org
Tue Oct 3 19:25:53 MSK 2023


On 10/3/23 16:37, Maksim Kokryashkin wrote:
> From: Mike Pall <mike>
>
> An unused guarded CONV int.num cannot be omitted in general.
>
> (cherry-picked from commit 881d02d3117838acaf4fb844332c8e33cc95c8c5)
>
> In some cases, an unused `CONV int.num` omission in `DUALNUM` mode

I would add that DUALNUM could be enabled in CMake by "-DLUAJIT_NUMMODE=2"

because it is not obvious and there is no documentation for CMake options.

> may lead to a guard absence, resulting in invalid control flow
> branching and undefined behavior. For a comprehensive example of
> the described situation, please refer to the comment
> in `test/tarantool-tests/mark-conv-non-weak.test.lua`.
<snipped>


More information about the Tarantool-patches mailing list