[compiler-rt] [sanitizer] Add CHECKs to validate calculated TLS range (PR #107941)
LLVM Continuous Integration via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 15:36:13 PDT 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-ppc64le-linux-test-suite` running on `ppc64le-clang-test-suite` while building `compiler-rt` at step 6 "test-build-unified-tree-check-all".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/builds/3635
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'SanitizerCommon-asan-powerpc64le-Linux :: Linux/getgrouplist.cpp' FAILED ********************
Exit Code: 1
Command Output (stderr):
--
RUN: at line 1: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/./bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=address -m64 -fno-function-sections -funwind-tables -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test -ldl -O0 -g /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/getgrouplist.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/asan-powerpc64le-Linux/Linux/Output/getgrouplist.cpp.tmp && /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/asan-powerpc64le-Linux/Linux/Output/getgrouplist.cpp.tmp
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/./bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=address -m64 -fno-function-sections -funwind-tables -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test -ldl -O0 -g /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/getgrouplist.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/asan-powerpc64le-Linux/Linux/Output/getgrouplist.cpp.tmp
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/asan-powerpc64le-Linux/Linux/Output/getgrouplist.cpp.tmp
AddressSanitizer: CHECK failed: sanitizer_tls_get_addr.cpp:156 "((reinterpret_cast<uptr>(res))) < ((tls_beg + tls_size))" (0x7e7ff6ce8040, 0x7e7ff6ce0100) (tid=2167537)
#0 0x000100118f3c in __asan::CheckUnwind() /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:69:3
#1 0x00010013ebf8 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5
#2 0x00010013806c in __sanitizer::DTLS_on_tls_get_addr(void*, void*, unsigned long, unsigned long) /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cpp:156:5
#3 0x00010009ac94 in __tls_get_addr_opt /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:5440:20
#4 0x7dfff49be574 (/lib64/libnss_systemd.so.2+0xe574) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#5 0x7dfff4a59380 (/lib64/libnss_systemd.so.2+0xa9380) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#6 0x7dfff4a3c1dc (/lib64/libnss_systemd.so.2+0x8c1dc) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#7 0x7dfff4a3c624 (/lib64/libnss_systemd.so.2+0x8c624) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#8 0x7dfff49edf04 (/lib64/libnss_systemd.so.2+0x3df04) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#9 0x7dfff49ee41c (/lib64/libnss_systemd.so.2+0x3e41c) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#10 0x7dfff49ee7d0 (/lib64/libnss_systemd.so.2+0x3e7d0) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#11 0x7dfff49ee8c8 (/lib64/libnss_systemd.so.2+0x3e8c8) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#12 0x7dfff49bffc8 (/lib64/libnss_systemd.so.2+0xffc8) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#13 0x7ffff79a030c in compat_call.constprop.0 (/lib64/libc.so.6+0xf030c) (BuildId: 1b9785bdef9e03ff9eac097ebd8cfdd5f8367bce)
#14 0x7ffff79a0a74 in internal_getgrouplist (/lib64/libc.so.6+0xf0a74) (BuildId: 1b9785bdef9e03ff9eac097ebd8cfdd5f8367bce)
#15 0x7ffff79a0c34 in getgrouplist (/lib64/libc.so.6+0xf0c34) (BuildId: 1b9785bdef9e03ff9eac097ebd8cfdd5f8367bce)
#16 0x0001000befac in getgrouplist /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:7326:9
#17 0x0001001669b8 in main /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/getgrouplist.cpp:20:7
#18 0x7ffff78da968 in generic_start_main.isra.0 (/lib64/libc.so.6+0x2a968) (BuildId: 1b9785bdef9e03ff9eac097ebd8cfdd5f8367bce)
#19 0x7ffff78dab00 in __libc_start_main (/lib64/libc.so.6+0x2ab00) (BuildId: 1b9785bdef9e03ff9eac097ebd8cfdd5f8367bce)
--
********************
Step 7 (test-build-unified-tree-check-runtimes) failure: test (failure)
******************** TEST 'SanitizerCommon-msan-powerpc64le-Linux :: Linux/getpwnam_r_invalid_user.cpp' FAILED ********************
Exit Code: 1
Command Output (stderr):
--
RUN: at line 2: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/./bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=memory -m64 -fno-function-sections -funwind-tables -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test -ldl -O0 -g /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/msan-powerpc64le-Linux/Linux/Output/getpwnam_r_invalid_user.cpp.tmp && /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/msan-powerpc64le-Linux/Linux/Output/getpwnam_r_invalid_user.cpp.tmp
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/./bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=memory -m64 -fno-function-sections -funwind-tables -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test -ldl -O0 -g /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp -o /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/msan-powerpc64le-Linux/Linux/Output/getpwnam_r_invalid_user.cpp.tmp
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/msan-powerpc64le-Linux/Linux/Output/getpwnam_r_invalid_user.cpp.tmp
MemorySanitizer: CHECK failed: sanitizer_tls_get_addr.cpp:156 "((reinterpret_cast<uptr>(res))) < ((tls_beg + tls_size))" (0x306000008000, 0x3060000000c0) (tid=3983551)
#0 0x00010005ef58 in CheckUnwind() /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/lib/msan/msan.cpp:440:3
#1 0x000100040768 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5
#2 0x000100039b8c in __sanitizer::DTLS_on_tls_get_addr(void*, void*, unsigned long, unsigned long) /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cpp:156:5
#3 0x00010009ed84 in __tls_get_addr_opt /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_common_interceptors.inc:5440:20
#4 0x7ffff5dbe574 (/lib64/libnss_systemd.so.2+0xe574) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#5 0x7ffff5e59380 (/lib64/libnss_systemd.so.2+0xa9380) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#6 0x7ffff5e3c1dc (/lib64/libnss_systemd.so.2+0x8c1dc) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#7 0x7ffff5e3c624 (/lib64/libnss_systemd.so.2+0x8c624) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#8 0x7ffff5dedf04 (/lib64/libnss_systemd.so.2+0x3df04) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#9 0x7ffff5dee41c (/lib64/libnss_systemd.so.2+0x3e41c) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#10 0x7ffff5dee7d0 (/lib64/libnss_systemd.so.2+0x3e7d0) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#11 0x7ffff5dee8c8 (/lib64/libnss_systemd.so.2+0x3e8c8) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#12 0x7ffff5dc0918 in _nss_systemd_getpwnam_r (/lib64/libnss_systemd.so.2+0x10918) (BuildId: 1cdbb72c5467047b5410c35c93a03e31c66fd933)
#13 0x7ffff79a481c in getpwnam_r@@GLIBC_2.17 (/lib64/libc.so.6+0xf481c) (BuildId: 1b9785bdef9e03ff9eac097ebd8cfdd5f8367bce)
#14 0x000100085438 in getpwnam_r /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_common_interceptors.inc:1962:13
#15 0x0001000e78b8 in main /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp:16:13
#16 0x7ffff78da968 in generic_start_main.isra.0 (/lib64/libc.so.6+0x2a968) (BuildId: 1b9785bdef9e03ff9eac097ebd8cfdd5f8367bce)
#17 0x7ffff78dab00 in __libc_start_main (/lib64/libc.so.6+0x2ab00) (BuildId: 1b9785bdef9e03ff9eac097ebd8cfdd5f8367bce)
--
********************
```
</details>
https://github.com/llvm/llvm-project/pull/107941
More information about the llvm-commits
mailing list