[Tarantool-patches] [PATCH luajit] Prevent sanitizer warning in os.time().
Evgeniy Temirgaleev
e.temirgaleev at tarantool.org
Mon Nov 9 05:51:07 MSK 2026
Hi, Sergey!
The patch is LGTM with the report to upstream. You made a great
discovery for the problem.
As the Mike doesn't want to add new runtime exceptions for os.time() in
the upstream, we may consider to add the check to our port as they are
added in a Lua of higher versions.
I think, Make may worry about consoles, but this is not our case. But on
the other hand, we have a datetime module and may not worry about this
error prone os.date() implementation.
Sergey Kaplun, Sergey Bronnikov, what do you think?
On 11/6/26 1:51 PM, Sergey Bronnikov wrote:
> Hi, Evgeniy,
>
> On 6/11/26 14:44, Evgeniy Temirgaleev via Tarantool-patches wrote:
>>
>> Hi, Sergey! Thanks for the patch!
>> Please, see my comment.
snipped.
>> We just suppress signed integer-overflow warning implicitly by casting
>> (and get an unsigned integer-overflow warning instead —
>> try `luajit -e "os.time({ day = 0, month = 0, year = 0 })"` with clang
>> and -fsanitize=integer).
>
> Thanks for highlighting this!
>
> I've reported this to upstream [1].
>
> 1. https://github.com/LuaJIT/LuaJIT/issues/1454#issuecomment-6683039935
>
> <snipped>
--
--
Best regards,
Evgeniy Temirgaleev
More information about the Tarantool-patches
mailing list