[compiler-rt] [hwasan] Flush stderr/stdout in tests (PR #114083)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 16:44:53 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `compiler-rt` at step 7 "test-build-unified-tree-check-all".

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

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

```
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'HWAddressSanitizer-x86_64 :: TestCases/use-after-free.c' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /build/buildbot/premerge-monolithic-linux/build/./bin/clang   -m64  -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -fsanitize-hwaddress-experimental-aliasing -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 -O0 -DISREAD=1 /build/buildbot/premerge-monolithic-linux/llvm-project/compiler-rt/test/hwasan/TestCases/use-after-free.c -o /build/buildbot/premerge-monolithic-linux/build/runtimes/runtimes-bins/compiler-rt/test/hwasan/X86_64/TestCases/Output/use-after-free.c.tmp && not  /build/buildbot/premerge-monolithic-linux/build/runtimes/runtimes-bins/compiler-rt/test/hwasan/X86_64/TestCases/Output/use-after-free.c.tmp 2>&1 | FileCheck /build/buildbot/premerge-monolithic-linux/llvm-project/compiler-rt/test/hwasan/TestCases/use-after-free.c --check-prefixes=CHECK
+ /build/buildbot/premerge-monolithic-linux/build/./bin/clang -m64 -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -fsanitize-hwaddress-experimental-aliasing -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 -O0 -DISREAD=1 /build/buildbot/premerge-monolithic-linux/llvm-project/compiler-rt/test/hwasan/TestCases/use-after-free.c -o /build/buildbot/premerge-monolithic-linux/build/runtimes/runtimes-bins/compiler-rt/test/hwasan/X86_64/TestCases/Output/use-after-free.c.tmp
+ not /build/buildbot/premerge-monolithic-linux/build/runtimes/runtimes-bins/compiler-rt/test/hwasan/X86_64/TestCases/Output/use-after-free.c.tmp
+ FileCheck /build/buildbot/premerge-monolithic-linux/llvm-project/compiler-rt/test/hwasan/TestCases/use-after-free.c --check-prefixes=CHECK
/build/buildbot/premerge-monolithic-linux/llvm-project/compiler-rt/test/hwasan/TestCases/use-after-free.c:35:12: error: CHECK: expected string not found in input
 // CHECK: #1 {{.*}} in main {{.*}}use-after-free.c:[[@LINE-19]]
           ^
<stdin>:16:137: note: scanning from here
 #0 0x5cf467175927 in free /build/buildbot/premerge-monolithic-linux/llvm-project/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp:85:3
                                                                                                                                        ^
<stdin>:16:137: note: with "@LINE-19" equal to "16"
 #0 0x5cf467175927 in free /build/buildbot/premerge-monolithic-linux/llvm-project/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp:85:3
                                                                                                                                        ^
<stdin>:17:100: note: possible intended match here
 #1 0x5cf4671bb29a in main /build/buildbot/premerge-monolithic-linux/llvm-project/compiler-rt/test/hwasan/TestCases/use-after-free.c:15:3
                                                                                                   ^

Input file: <stdin>
Check file: /build/buildbot/premerge-monolithic-linux/llvm-project/compiler-rt/test/hwasan/TestCases/use-after-free.c

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            .
            .
            .
           11: [0x480200000000,0x480200000010) is a small unallocated heap chunk; size: 16 offset: 5 
           12:  
           13: Cause: use-after-free 
           14: 0x480200000005 is located 5 bytes inside a 10-byte region [0x480200000000,0x48020000000a) 
           15: freed by thread T0 here: 
           16:  #0 0x5cf467175927 in free /build/buildbot/premerge-monolithic-linux/llvm-project/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp:85:3 
check:35'0                                                                                                                                             X~~~~~ error: no match found
check:35'1                                                                                                                                                    with "@LINE-19" equal to "16"
           17:  #1 0x5cf4671bb29a in main /build/buildbot/premerge-monolithic-linux/llvm-project/compiler-rt/test/hwasan/TestCases/use-after-free.c:15:3 
check:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:35'2                                                                                                        ?                                       possible intended match
           18:  #2 0x7ace92df3d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: a43bfc8428df6623cd498c9c0caeb91aec9be4f9) 
check:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           19:  
check:35'0     ~
           20: previously allocated by thread T0 here: 
check:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           21:  #0 0x5cf467176004 in malloc /build/buildbot/premerge-monolithic-linux/llvm-project/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp:147:3 
...

```

</details>

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


More information about the llvm-commits mailing list