[compiler-rt] [llvm] [asan] Catch `initialization-order-fiasco` in modules without globals (PR #104621)
LLVM Continuous Integration via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 16 21:11:59 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,llvm` at step 6 "test-build-unified-tree-check-all".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/3497
Here is the relevant piece of the build log for the reference:
```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: CodeGen/sanitize-ignorelist-mainfile.c' FAILED ********************
Exit Code: 1
Command Output (stderr):
--
RUN: at line 2: rm -rf /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp && split-file /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp && cd /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp
+ rm -rf /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp
+ split-file /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp
+ cd /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp
RUN: at line 3: /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang -cc1 -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/lib/clang/20/include -nostdsysteminc -emit-llvm -triple x86_64 -fsanitize=address,alignment a.c -o - | /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c --check-prefixes=CHECK,DEFAULT
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang -cc1 -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/lib/clang/20/include -nostdsysteminc -emit-llvm -triple x86_64 -fsanitize=address,alignment a.c -o -
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c --check-prefixes=CHECK,DEFAULT
RUN: at line 4: /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang -cc1 -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/lib/clang/20/include -nostdsysteminc -emit-llvm -triple x86_64 -fsanitize=address,alignment -fsanitize-ignorelist=a.list a.c -o - | /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c --check-prefixes=CHECK,IGNORE
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang -cc1 -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/lib/clang/20/include -nostdsysteminc -emit-llvm -triple x86_64 -fsanitize=address,alignment -fsanitize-ignorelist=a.list a.c -o -
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c --check-prefixes=CHECK,IGNORE
[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c:35:16: [0m[0;1;31merror: [0m[1mIGNORE-NOT: excluded string found in input
[0m// IGNORE-NOT: @___asan_gen_
[0;1;32m ^
[0m[1m<stdin>:9:1: [0m[0;1;30mnote: [0m[1mfound here
[0m at ___asan_gen_ = private constant [4 x i8] c"a.c\00", align 1
[0;1;32m^~~~~~~~~~~~~
[0m
Input file: <stdin>
Check file: /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c
-dump-input=help explains the following input dump.
Input was:
<<<<<<
[1m[0m[0;1;30m 1: [0m[1m[0;1;46m; ModuleID = 'a.c' [0m
[0;1;30m 2: [0m[1m[0;1;46msource_filename = "a.c" [0m
[0;1;30m 3: [0m[1m[0;1;46mtarget datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" [0m
[0;1;30m 4: [0m[1m[0;1;46mtarget triple = "x86_64" [0m
[0;1;30m 5: [0m[1m[0;1;46m [0m
[0;1;30m 6: [0m[1m[0;1;46m at global_h = global i32 0, no_sanitize_address, align 4 [0m
[0;1;30m 7: [0m[1m[0;1;46m at global_c = global i32 0, no_sanitize_address, align 4 [0m
[0;1;30m 8: [0m[1m[0;1;46m at llvm.used = appending global [1 x ptr] [ptr @asan.module_ctor], section "llvm.metadata" [0m
[0;1;30m 9: [0m[1m[0;1;46m at ___asan_gen_ = private constant [4 x i8] c"a.c\00", align 1 [0m
[0;1;31mnot:35 !~~~~~~~~~~~~ error: no match expected
[0m[0;1;30m 10: [0m[1m[0;1;46m at llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 1, ptr @asan.module_ctor, ptr null }] [0m
[0;1;30m 11: [0m[1m[0;1;46m [0m
[0;1;30m 12: [0m[1m[0;1;46m; Function Attrs: noinline nounwind optnone [0m
[0;1;30m 13: [0m[1m[0;1;46mdefine dso_local i32 @foo(ptr noundef %x) #0 { [0m
[0;1;30m 14: [0m[1m[0;1;46mentry: [0m
[0;1;30m 15: [0m[1m[0;1;46m %x.addr = alloca ptr, align 8 [0m
[0;1;30m 16: [0m[1m[0;1;46m store ptr %x, ptr %x.addr, align 8 [0m
[0;1;30m 17: [0m[1m[0;1;46m %0 = load ptr, ptr %x.addr, align 8 [0m
[0;1;30m 18: [0m[1m[0;1;46m %call = call i32 @load(ptr noundef %0) [0m
[0;1;30m 19: [0m[1m[0;1;46m ret i32 %call [0m
[0;1;30m 20: [0m[1m[0;1;46m} [0m
...
```
https://github.com/llvm/llvm-project/pull/104621
More information about the llvm-commits
mailing list