[llvm] Add clang::lifetimebound annotation to StringRef constructors. (PR #113878)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 28 08:04:09 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-qemu` running on `sanitizer-buildbot4` while building `llvm` at step 2 "annotate".

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

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[305/310] Building CXX object tools/llvm-objdump/CMakeFiles/llvm-objdump.dir/llvm-objdump.cpp.o
[306/310] Linking CXX executable bin/llvm-objdump
[307/310] Building CXX object tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ELFDumper.cpp.o
[308/310] Linking CXX executable bin/llvm-readobj
[309/310] Generating ../../bin/llvm-readelf
[309/310] Running the HWAddressSanitizer tests with Intel LAM
llvm-lit: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/lit.common.cfg.py:380: warning: %device_rm is not implemented
llvm-lit: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 108 of 109 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50..
FAIL: HWAddressSanitizer-x86_64 :: TestCases/pthread_create.c (64 of 108)
******************** TEST 'HWAddressSanitizer-x86_64 :: TestCases/pthread_create.c' FAILED ********************
Exit Code: 99

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/./bin/clang   -m64  -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/pthread_create.c -o /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/pthread_create.c.tmp
+ /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/./bin/clang -m64 -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/pthread_create.c -o /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/pthread_create.c.tmp
RUN: at line 3: env HWASAN_OPTIONS=disable_allocator_tagging=1:random_tags=0:fail_without_syscall_abi=0:random_tags=1 env SSH_CONTROL_SOCKET=/home/b/sanitizer-x86_64-linux-qemu/build/qemu_tmp/ssh-control-socket /home/b/sanitizer-x86_64-linux-qemu/sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/ssh_run.sh /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/pthread_create.c.tmp
+ env HWASAN_OPTIONS=disable_allocator_tagging=1:random_tags=0:fail_without_syscall_abi=0:random_tags=1 env SSH_CONTROL_SOCKET=/home/b/sanitizer-x86_64-linux-qemu/build/qemu_tmp/ssh-control-socket /home/b/sanitizer-x86_64-linux-qemu/sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/ssh_run.sh /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/pthread_create.c.tmp
HWAddressSanitizer: CHECK failed: sanitizer_linux_libcdep.cpp:181 "((pthread_getattr_np(pthread_self(), &attr))) == ((0))" (0xe, 0x0) (tid=734)
    #0 0x556f982c3382 in __hwasan::CheckUnwind() /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan.cpp:165:3
    #1 0x556f982f24f2 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5
    #2 0x556f982f306b in __sanitizer::GetThreadStackTopAndBottom(bool, unsigned long*, unsigned long*) /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:181:3
    #3 0x556f982f339f in __sanitizer::GetThreadStackAndTls(bool, unsigned long*, unsigned long*, unsigned long*, unsigned long*) /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:688:3
    #4 0x556f982dc8d1 in __hwasan::Thread::Init(unsigned long, unsigned long, __hwasan::Thread::InitState const*) /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan_thread.cpp:59:3
    #5 0x556f982d754f in __hwasan::HwasanThreadList::CreateCurrentThread(__hwasan::Thread::InitState const*) /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan_thread_list.h:110:8
    #6 0x556f982d7cbf in __hwasan_thread_enter /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan_linux.cpp:576:22
    #7 0x556f982d6d3b in HwasanThreadStartFunc(void*) /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan_interceptors.cpp:253:3
    #8 0x7f0b4c86ca93  (/lib/x86_64-linux-gnu/libc.so.6+0x9ca93) (BuildId: 232274c0019767b821da1c6ebc2df43e60503035)
    #9 0x7f0b4c8f9c3b  (/lib/x86_64-linux-gnu/libc.so.6+0x129c3b) (BuildId: 232274c0019767b821da1c6ebc2df43e60503035)


--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50..
FAIL: HWAddressSanitizer-x86_64 :: TestCases/many-threads-uaf.c (65 of 108)
******************** TEST 'HWAddressSanitizer-x86_64 :: TestCases/many-threads-uaf.c' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/./bin/clang   -m64  -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/many-threads-uaf.c -o /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/many-threads-uaf.c.tmp && not env HWASAN_OPTIONS=disable_allocator_tagging=1:random_tags=0:fail_without_syscall_abi=0:verbose_threads=1 env SSH_CONTROL_SOCKET=/home/b/sanitizer-x86_64-linux-qemu/build/qemu_tmp/ssh-control-socket /home/b/sanitizer-x86_64-linux-qemu/sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/ssh_run.sh /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/many-threads-uaf.c.tmp 2>&1 | FileCheck /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/many-threads-uaf.c
+ /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/./bin/clang -m64 -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/many-threads-uaf.c -o /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/many-threads-uaf.c.tmp
+ FileCheck /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/many-threads-uaf.c
+ not env HWASAN_OPTIONS=disable_allocator_tagging=1:random_tags=0:fail_without_syscall_abi=0:verbose_threads=1 env SSH_CONTROL_SOCKET=/home/b/sanitizer-x86_64-linux-qemu/build/qemu_tmp/ssh-control-socket /home/b/sanitizer-x86_64-linux-qemu/sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/ssh_run.sh /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/many-threads-uaf.c.tmp
/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/many-threads-uaf.c:17:11: error: CHECK: expected string not found in input
// CHECK: Creating : T1
Step 30 (test hwasan x86_64_lam_qemu) failure: test hwasan x86_64_lam_qemu (failure)
...
[305/310] Building CXX object tools/llvm-objdump/CMakeFiles/llvm-objdump.dir/llvm-objdump.cpp.o
[306/310] Linking CXX executable bin/llvm-objdump
[307/310] Building CXX object tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ELFDumper.cpp.o
[308/310] Linking CXX executable bin/llvm-readobj
[309/310] Generating ../../bin/llvm-readelf
[309/310] Running the HWAddressSanitizer tests with Intel LAM
llvm-lit: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/lit.common.cfg.py:380: warning: %device_rm is not implemented
llvm-lit: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 108 of 109 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50..
FAIL: HWAddressSanitizer-x86_64 :: TestCases/pthread_create.c (64 of 108)
******************** TEST 'HWAddressSanitizer-x86_64 :: TestCases/pthread_create.c' FAILED ********************
Exit Code: 99

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/./bin/clang   -m64  -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/pthread_create.c -o /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/pthread_create.c.tmp
+ /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/./bin/clang -m64 -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/pthread_create.c -o /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/pthread_create.c.tmp
RUN: at line 3: env HWASAN_OPTIONS=disable_allocator_tagging=1:random_tags=0:fail_without_syscall_abi=0:random_tags=1 env SSH_CONTROL_SOCKET=/home/b/sanitizer-x86_64-linux-qemu/build/qemu_tmp/ssh-control-socket /home/b/sanitizer-x86_64-linux-qemu/sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/ssh_run.sh /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/pthread_create.c.tmp
+ env HWASAN_OPTIONS=disable_allocator_tagging=1:random_tags=0:fail_without_syscall_abi=0:random_tags=1 env SSH_CONTROL_SOCKET=/home/b/sanitizer-x86_64-linux-qemu/build/qemu_tmp/ssh-control-socket /home/b/sanitizer-x86_64-linux-qemu/sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/ssh_run.sh /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/pthread_create.c.tmp
HWAddressSanitizer: CHECK failed: sanitizer_linux_libcdep.cpp:181 "((pthread_getattr_np(pthread_self(), &attr))) == ((0))" (0xe, 0x0) (tid=734)
    #0 0x556f982c3382 in __hwasan::CheckUnwind() /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan.cpp:165:3
    #1 0x556f982f24f2 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5
    #2 0x556f982f306b in __sanitizer::GetThreadStackTopAndBottom(bool, unsigned long*, unsigned long*) /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:181:3
    #3 0x556f982f339f in __sanitizer::GetThreadStackAndTls(bool, unsigned long*, unsigned long*, unsigned long*, unsigned long*) /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:688:3
    #4 0x556f982dc8d1 in __hwasan::Thread::Init(unsigned long, unsigned long, __hwasan::Thread::InitState const*) /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan_thread.cpp:59:3
    #5 0x556f982d754f in __hwasan::HwasanThreadList::CreateCurrentThread(__hwasan::Thread::InitState const*) /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan_thread_list.h:110:8
    #6 0x556f982d7cbf in __hwasan_thread_enter /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan_linux.cpp:576:22
    #7 0x556f982d6d3b in HwasanThreadStartFunc(void*) /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan_interceptors.cpp:253:3
    #8 0x7f0b4c86ca93  (/lib/x86_64-linux-gnu/libc.so.6+0x9ca93) (BuildId: 232274c0019767b821da1c6ebc2df43e60503035)
    #9 0x7f0b4c8f9c3b  (/lib/x86_64-linux-gnu/libc.so.6+0x129c3b) (BuildId: 232274c0019767b821da1c6ebc2df43e60503035)


--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50..
FAIL: HWAddressSanitizer-x86_64 :: TestCases/many-threads-uaf.c (65 of 108)
******************** TEST 'HWAddressSanitizer-x86_64 :: TestCases/many-threads-uaf.c' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/./bin/clang   -m64  -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/many-threads-uaf.c -o /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/many-threads-uaf.c.tmp && not env HWASAN_OPTIONS=disable_allocator_tagging=1:random_tags=0:fail_without_syscall_abi=0:verbose_threads=1 env SSH_CONTROL_SOCKET=/home/b/sanitizer-x86_64-linux-qemu/build/qemu_tmp/ssh-control-socket /home/b/sanitizer-x86_64-linux-qemu/sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/ssh_run.sh /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/many-threads-uaf.c.tmp 2>&1 | FileCheck /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/many-threads-uaf.c
+ /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/./bin/clang -m64 -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/many-threads-uaf.c -o /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/many-threads-uaf.c.tmp
+ FileCheck /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/many-threads-uaf.c
+ not env HWASAN_OPTIONS=disable_allocator_tagging=1:random_tags=0:fail_without_syscall_abi=0:verbose_threads=1 env SSH_CONTROL_SOCKET=/home/b/sanitizer-x86_64-linux-qemu/build/qemu_tmp/ssh-control-socket /home/b/sanitizer-x86_64-linux-qemu/sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/ssh_run.sh /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/many-threads-uaf.c.tmp
/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/many-threads-uaf.c:17:11: error: CHECK: expected string not found in input
// CHECK: Creating : T1

```

</details>

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


More information about the llvm-commits mailing list