[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:57 PDT 2024


llvm-ci wrote:

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

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

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)
...
[       OK ] LlvmLibcStrtoimaxTest.AutomaticBaseSelection (34 us)
Ran 7 tests.  PASS: 7  FAIL: 0
[938/950] Linking CXX executable projects/libc/test/src/math/smoke/libc.test.src.math.smoke.nanf128_test.__unit__.__build__
[939/950] Running unit test libc.test.utils.FPUtil.x86_long_double_test
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcX86LongDoubleTest.is_nan
[       OK ] LlvmLibcX86LongDoubleTest.is_nan (180 ms)
Ran 1 tests.  PASS: 1  FAIL: 0
[940/950] Linking CXX executable projects/libc/test/src/math/smoke/libc.test.src.math.smoke.nan_test.__unit__.__build__
[941/950] Running unit test libc.test.src.math.smoke.nanf128_test.__unit__
FAILED: projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nanf128_test.__unit__ /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nanf128_test.__unit__ 
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/test/src/math/smoke && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/test/src/math/smoke/libc.test.src.math.smoke.nanf128_test.__unit__.__build__
[==========] Running 3 tests from 1 test suite.
[ RUN      ] LlvmLibcNanf128Test.NCharSeq
[       OK ] LlvmLibcNanf128Test.NCharSeq (12 us)
[ RUN      ] LlvmLibcNanf128Test.RandomString
[       OK ] LlvmLibcNanf128Test.RandomString (2 us)
[ RUN      ] LlvmLibcNanf128Test.InvalidInput
AddressSanitizer:DEADLYSIGNAL
=================================================================
==4154006==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55f279e4948a bp 0x7fffccbf2900 sp 0x7fffccbf2800 T0)
==4154006==The signal is caused by a READ memory access.
==4154006==Hint: address points to the zero page.
    #0 0x55f279e4948a in __llvm_libc_19_0_0_git::StrToNumResult<__float128> __llvm_libc_19_0_0_git::internal::strtonan<__float128>(char const*) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/__support/str_to_float.h:1219:18
    #1 0x55f279e4948a in __llvm_libc_19_0_0_git::nanf128(char const*) /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/math/generic/nanf128.cpp:18:17
    #2 0x55f279e487ea in LlvmLibcNanf128Test_InvalidInput::Run()::$_0::operator()() const /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math/smoke/nanf128_test.cpp:59:3
    #3 0x55f279e487ea in __llvm_libc_19_0_0_git::testutils::FunctionCaller* __llvm_libc_19_0_0_git::testing::Test::createCallable<LlvmLibcNanf128Test_InvalidInput::Run()::$_0>(LlvmLibcNanf128Test_InvalidInput::Run()::$_0)::Callable::operator()() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/UnitTest/LibcTest.h:210:36
    #4 0x55f279e4d116 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-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/UnitTest/ExecuteFunctionUnix.cpp:51:5
    #5 0x55f279e4c0ca 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-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/UnitTest/LibcDeathTestExecutors.cpp:28:7
    #6 0x55f279e48729 in LlvmLibcNanf128Test_InvalidInput::Run() /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math/smoke/nanf128_test.cpp:59:3
    #7 0x55f279e4d960 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-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/UnitTest/LibcTest.cpp:166:8
    #8 0x55f279e68221 in main /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/UnitTest/LibcTestMain.cpp:51:10
    #9 0x7f6664246249  (/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-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/__support/str_to_float.h:1219:18 in __llvm_libc_19_0_0_git::StrToNumResult<__float128> __llvm_libc_19_0_0_git::internal::strtonan<__float128>(char const*)
==4154006==ABORTING
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math/smoke/nanf128_test.cpp:59: FAILURE
Expected [] { __llvm_libc_19_0_0_git::nanf128(nullptr); } to be killed by a signal
But it exited normally!
[  FAILED  ] LlvmLibcNanf128Test.InvalidInput
Ran 3 tests.  PASS: 2  FAIL: 1
[942/950] Linking CXX executable projects/libc/test/src/math/smoke/libc.test.src.math.smoke.nanf_test.__unit__.__build__
[943/950] Linking CXX executable projects/libc/test/src/math/smoke/libc.test.src.math.smoke.nanl_test.__unit__.__build__
[944/950] Running unit test libc.test.src.math.smoke.nan_test.__unit__
FAILED: projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nan_test.__unit__ /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nan_test.__unit__ 
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/test/src/math/smoke && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/test/src/math/smoke/libc.test.src.math.smoke.nan_test.__unit__.__build__
[==========] Running 3 tests from 1 test suite.
[ RUN      ] LlvmLibcNanTest.NCharSeq

```

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


More information about the libc-commits mailing list