[compiler-rt] Fix prctl to handle PR_GET_PDEATHSIG. (PR #101749)
LLVM Continuous Integration via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 14:39:53 PDT 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu` running on `sie-linux-worker3` while building `compiler-rt` at step 6 "test-build-unified-tree-check-all".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/3002
Here is the relevant piece of the build log for the reference:
```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'SanitizerCommon-asan-x86_64-Linux :: Linux/prctl.cpp' FAILED ********************
Exit Code: 1
Command Output (stderr):
--
RUN: at line 1: /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=address -m64 -funwind-tables -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test -ldl /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/prctl.cpp -o /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/asan-x86_64-Linux/Linux/Output/prctl.cpp.tmp && /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/asan-x86_64-Linux/Linux/Output/prctl.cpp.tmp /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=address -m64 -funwind-tables -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test -ldl /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/prctl.cpp -o /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/asan-x86_64-Linux/Linux/Output/prctl.cpp.tmp
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/asan-x86_64-Linux/Linux/Output/prctl.cpp.tmp /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux
=================================================================
==2183529==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f28a4d00044 at pc 0x562f23ebeaf5 bp 0x7ffdcf0e30d0 sp 0x7ffdcf0e2880
WRITE of size 8 at 0x7f28a4d00044 thread T0
#0 0x562f23ebeaf4 in prctl /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc
#1 0x562f23f7ec57 in main /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/prctl.cpp:45:9
#2 0x7f28a6ffb082 in __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:308:16
#3 0x562f23e9d34d in _start (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/asan-x86_64-Linux/Linux/Output/prctl.cpp.tmp+0x2c34d)
Address 0x7f28a4d00044 is located in stack of thread T0 at offset 68 in frame
#0 0x562f23f7e90f in main /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/prctl.cpp:27
This frame has 5 object(s):
[32, 40) 'cookie' (line 36)
[64, 68) 'signum' (line 44) <== Memory access at offset 68 overflows this variable
[80, 161) 'invname' (line 52)
[208, 214) 'vlname' (line 52)
[240, 256) 'name' (line 74)
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/prctl.cpp:45:9 in main
Shadow bytes around the buggy address:
0x7f28a4cffd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7f28a4cffe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7f28a4cffe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7f28a4cfff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7f28a4cfff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x7f28a4d00000: f1 f1 f1 f1 00 f2 f2 f2[04]f2 f8 f8 f8 f8 f8 f8
0x7f28a4d00080: f8 f8 f8 f8 f8 f2 f2 f2 f2 f2 f8 f2 f2 f2 f8 f8
0x7f28a4d00100: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
0x7f28a4d00180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7f28a4d00200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7f28a4d00280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
...
```
https://github.com/llvm/llvm-project/pull/101749
More information about the llvm-commits
mailing list