[libc-commits] [libc] [libc] Fix math tests for macos arm64. (PR #100060)

LLVM Continuous Integration via libc-commits libc-commits at lists.llvm.org
Tue Jul 23 09:27:20 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-dbg-asan` running on `libc-x86_64-debian` while building `libc` at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/147/builds/2762

Here is the relevant piece of the build log for the reference:
```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[ RUN      ] LlvmLibcStrtouint32Test.DecodeInOtherBases
[       OK ] LlvmLibcStrtouint32Test.DecodeInOtherBases (286 ms)
[ RUN      ] LlvmLibcStrtouint32Test.CleanBaseSixteenDecode
[       OK ] LlvmLibcStrtouint32Test.CleanBaseSixteenDecode (10 us)
[ RUN      ] LlvmLibcStrtouint32Test.MessyBaseSixteenDecode
[       OK ] LlvmLibcStrtouint32Test.MessyBaseSixteenDecode (4 us)
[ RUN      ] LlvmLibcStrtouint32Test.AutomaticBaseSelection
[       OK ] LlvmLibcStrtouint32Test.AutomaticBaseSelection (4 us)
Ran 14 tests.  PASS: 14  FAIL: 0
[879/883] Running unit test libc.test.src.math.smoke.nanl_test.__unit__
FAILED: projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nanl_test.__unit__ /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nanl_test.__unit__ 
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/math/smoke && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/math/smoke/libc.test.src.math.smoke.nanl_test.__unit__.__build__
[==========] Running 3 tests from 1 test suite.
[ RUN      ] LlvmLibcNanlTest.NCharSeq
[       OK ] LlvmLibcNanlTest.NCharSeq (11 us)
[ RUN      ] LlvmLibcNanlTest.RandomString
[       OK ] LlvmLibcNanlTest.RandomString (3 us)
[ RUN      ] LlvmLibcNanlTest.InvalidInput
AddressSanitizer:DEADLYSIGNAL
=================================================================
==1707524==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55e7c72256fa bp 0x7ffe4a6bb220 sp 0x7ffe4a6bb120 T0)
==1707524==The signal is caused by a READ memory access.
==1707524==Hint: address points to the zero page.
    #0 0x55e7c72256fa in __llvm_libc_19_0_0_git::StrToNumResult<long double> __llvm_libc_19_0_0_git::internal::strtonan<long double>(char const*) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/str_to_float.h:1219:18
    #1 0x55e7c72256fa in __llvm_libc_19_0_0_git::nanl(char const*) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/math/generic/nanl.cpp:18:17
    #2 0x55e7c7224a7a in LlvmLibcNanlTest_InvalidInput::Run()::$_0::operator()() const /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/src/math/smoke/nanl_test.cpp:75:3
    #3 0x55e7c7224a7a in __llvm_libc_19_0_0_git::testutils::FunctionCaller* __llvm_libc_19_0_0_git::testing::Test::createCallable<LlvmLibcNanlTest_InvalidInput::Run()::$_0>(LlvmLibcNanlTest_InvalidInput::Run()::$_0)::Callable::operator()() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcTest.h:210:36
    #4 0x55e7c7229416 in __llvm_libc_19_0_0_git::testutils::invoke_in_subprocess(__llvm_libc_19_0_0_git::testutils::FunctionCaller*, unsigned int) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/ExecuteFunctionUnix.cpp:51:5
    #5 0x55e7c72283ca in __llvm_libc_19_0_0_git::testing::Test::testProcessKilled(__llvm_libc_19_0_0_git::testutils::FunctionCaller*, int, char const*, char const*, __llvm_libc_19_0_0_git::testing::internal::Location) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcDeathTestExecutors.cpp:28:7
    #6 0x55e7c72249b9 in LlvmLibcNanlTest_InvalidInput::Run() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/src/math/smoke/nanl_test.cpp:75:3
    #7 0x55e7c7229c60 in __llvm_libc_19_0_0_git::testing::Test::runTests(__llvm_libc_19_0_0_git::testing::TestOptions const&) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcTest.cpp:166:8
    #8 0x55e7c7244521 in main /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/UnitTest/LibcTestMain.cpp:51:10
    #9 0x7f8fbf767249  (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 58254ca972028402bc40624f81388d85ec95f70d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/src/__support/str_to_float.h:1219:18 in __llvm_libc_19_0_0_git::StrToNumResult<long double> __llvm_libc_19_0_0_git::internal::strtonan<long double>(char const*)
==1707524==ABORTING
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/llvm-project/libc/test/src/math/smoke/nanl_test.cpp:75: FAILURE
Expected [] { __llvm_libc_19_0_0_git::nanl(nullptr); } to be killed by a signal
But it exited normally!
[  FAILED  ] LlvmLibcNanlTest.InvalidInput
Ran 3 tests.  PASS: 2  FAIL: 1
[880/883] Running unit test libc.test.src.math.smoke.nanf_test.__unit__
FAILED: projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nanf_test.__unit__ /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nanf_test.__unit__ 
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/math/smoke && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-asan/build/projects/libc/test/src/math/smoke/libc.test.src.math.smoke.nanf_test.__unit__.__build__
[==========] Running 3 tests from 1 test suite.
[ RUN      ] LlvmLibcNanfTest.NCharSeq
[       OK ] LlvmLibcNanfTest.NCharSeq (11 us)
[ RUN      ] LlvmLibcNanfTest.RandomString

```

https://github.com/llvm/llvm-project/pull/100060


More information about the libc-commits mailing list