Hi, Sergey,
Hi, Sergey! Thanks for the review! See my answers below. On 20.12.24, Sergey Bronnikov wrote:Hello, Sergey, thanks for the patch! See comments below. On 19.12.2024 12:30, Sergey Kaplun wrote:The `strtod parsing` subtest in the <lib/base/tonumber_scan.lua> checks the results yielded by the `strtod()` via FFI call. In glibc versions before 2.28 it returns an incorrect result (NaN instead of inf) for "0x3p1023" [1]. This patch hardens the skipcond for this test for a smaller version of the libc installed. [1]:https://sourceware.org/bugzilla/show_bug.cgi?id=23279 --- Branch:https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-fix-glibc-versions The CI failure for libc 2.23 (ubuntu 16): https://github.com/tarantool/tarantool/actions/runs/12376159316/job/34542626889?pr=10949#step:5:13916Ubuntu 16.04 EOL and EOS are reached [1]The CI failure for libc 2.24 (debian 9): https://github.com/tarantool/tarantool/actions/runs/12376159307/job/34542633454?pr=10949#step:5:13859Debian 9 EOL is reached 4 years ago [2]The CI failure for libc 2.27 (ubuntu 18): https://github.com/tarantool/tarantool/actions/runs/12376159278/job/34542625496?pr=10949#step:5:11743 The CI pass for libc 2.31 (ubuntu 20): https://github.com/tarantool/tarantool/actions/runs/12376159289/job/34542630993?pr=10949Ubuntu 20.04 support ends in 3 months and 2 week [1].Yes, unfortunately we should keep (AFAICS) these runners to check the installations for our customers.
I believe we will clarify a list of Linux distros in a separate activity.
test/LuaJIT-tests/lib/base/tonumber_scan.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/LuaJIT-tests/lib/base/tonumber_scan.lua b/test/LuaJIT-tests/lib/base/tonumber_scan.lua index ac7d68a4..800c57b0 100644 --- a/test/LuaJIT-tests/lib/base/tonumber_scan.lua +++ b/test/LuaJIT-tests/lib/base/tonumber_scan.lua @@ -186,9 +186,11 @@ do --- tonumber parsing test_conv(tonumber) end --- Skip for the old libc version with the bug in the `strtod()`. --- See alsohttps://sourceware.org/bugzilla/show_bug.cgi?id=16151. -do --- strtod parsing -libc<2.19 +-- Skip for the old libc version with the bugs in the `strtod()`. +-- Affected versions: +-- * <2.19:https://sourceware.org/bugzilla/show_bug.cgi?id=16151. +-- * <2.28:https://sourceware.org/bugzilla/show_bug.cgi?id=23279.I propose to skip strtod test when Glibc is older than say 2.30 [3] and avoid testing with ancient Glibc versions because Glibc implementation is buggy [4] and a there are lot of bugs in old and more or less new versions: v2.41 [5], v2.22 [6], v2.27 [7], v2.15 [8], v2.33 [9] etc [10]. I don't think we should waste our time with issues like this. 1. https://endoflife.date/ubuntu 2. https://endoflife.date/debian 3. https://sourceware.org/glibc/wiki/Release 4. https://github.com/tarantool/luajit/blob/cd5ab5da9b56bf560407554c0377cfa8567d4430/src/lj_strscan.c#L20-L27 5. https://sourceware.org/bugzilla/show_bug.cgi?id=30220 6. https://sourceware.org/bugzilla/show_bug.cgi?id=19380 7. https://sourceware.org/bugzilla/show_bug.cgi?id=15744 8. https://sourceware.org/bugzilla/show_bug.cgi?id=14049 9. https://sourceware.org/bugzilla/show_bug.cgi?id=26137 10. https://sourceware.org/bugzilla/buglist.cgi?bug_status=__all__&content=strtod&no_redirect=1&order=bug_id%20DESC&product=glibc&query_format=specificYes, I agree that this should be the last red line for us. If the test will fail again due to glibc, it will be easier just to drop it. For now, I see no failures for versions 2.31 -- 2.40, and find no bugs related to our tests that affected versions 2.28 -- 2.30, so let's skip it for versions less than 2.28 for now.
Okay, LGTM then.
Also discussed it and decided to remove the test if the same
issue will happen next time.
+do --- strtod parsing -libc<2.28 test_conv(function(s) local d = ffi.C.strtod(s, e) return (e[0][0] == 0 and #s ~= 0) and d or nil