[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:19:53 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-a-1` while building `compiler-rt,llvm` at step 4 "annotate".

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

Here is the relevant piece of the build log for the reference:
```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/fuchsia-linux.py ...' (failure)
...
[1324/1326] Linking CXX executable tools/clang/unittests/Tooling/ToolingTests
[1325/1326] Running the Clang regression tests
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using clang: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/clang
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find clang-repl in /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/wasm-ld
-- Testing: 21112 tests, 60 workers --
Testing:  0.. 10.. 20.. 30
FAIL: Clang :: CodeGen/sanitize-ignorelist-mainfile.c (7472 of 21112)
******************** TEST 'Clang :: CodeGen/sanitize-ignorelist-mainfile.c' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: rm -rf /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp && split-file /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp && cd /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp
+ rm -rf /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp
+ split-file /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp
+ cd /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp
RUN: at line 3: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/lib/clang/20/include -nostdsysteminc -emit-llvm -triple x86_64 -fsanitize=address,alignment a.c -o - | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c --check-prefixes=CHECK,DEFAULT
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/lib/clang/20/include -nostdsysteminc -emit-llvm -triple x86_64 -fsanitize=address,alignment a.c -o -
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c --check-prefixes=CHECK,DEFAULT
RUN: at line 4: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/lib/clang/20/include -nostdsysteminc -emit-llvm -triple x86_64 -fsanitize=address,alignment -fsanitize-ignorelist=a.list a.c -o - | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c --check-prefixes=CHECK,IGNORE
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c --check-prefixes=CHECK,IGNORE
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/lib/clang/20/include -nostdsysteminc -emit-llvm -triple x86_64 -fsanitize=address,alignment -fsanitize-ignorelist=a.list a.c -o -
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c:35:16: error: IGNORE-NOT: excluded string found in input
// IGNORE-NOT: @___asan_gen_
               ^
<stdin>:9:1: note: found here
@___asan_gen_ = private constant [4 x i8] c"a.c\00", align 1
^~~~~~~~~~~~~

Input file: <stdin>
Check file: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c

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

Input was:
<<<<<<
        1: ; ModuleID = 'a.c' 
        2: source_filename = "a.c" 
        3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" 
        4: target triple = "x86_64" 
        5:  
        6: @global_h = global i32 0, no_sanitize_address, align 4 
        7: @global_c = global i32 0, no_sanitize_address, align 4 
        8: @llvm.used = appending global [1 x ptr] [ptr @asan.module_ctor], section "llvm.metadata" 
        9: @___asan_gen_ = private constant [4 x i8] c"a.c\00", align 1 
Step 7 (check) failure: check (failure)
...
[1324/1326] Linking CXX executable tools/clang/unittests/Tooling/ToolingTests
[1325/1326] Running the Clang regression tests
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using clang: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/clang
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find clang-repl in /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/wasm-ld
-- Testing: 21112 tests, 60 workers --
Testing:  0.. 10.. 20.. 30
FAIL: Clang :: CodeGen/sanitize-ignorelist-mainfile.c (7472 of 21112)
******************** TEST 'Clang :: CodeGen/sanitize-ignorelist-mainfile.c' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: rm -rf /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp && split-file /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp && cd /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp
+ rm -rf /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp
+ split-file /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp
+ cd /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/tools/clang/test/CodeGen/Output/sanitize-ignorelist-mainfile.c.tmp
RUN: at line 3: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/lib/clang/20/include -nostdsysteminc -emit-llvm -triple x86_64 -fsanitize=address,alignment a.c -o - | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c --check-prefixes=CHECK,DEFAULT
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/lib/clang/20/include -nostdsysteminc -emit-llvm -triple x86_64 -fsanitize=address,alignment a.c -o -
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c --check-prefixes=CHECK,DEFAULT
RUN: at line 4: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/lib/clang/20/include -nostdsysteminc -emit-llvm -triple x86_64 -fsanitize=address,alignment -fsanitize-ignorelist=a.list a.c -o - | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c --check-prefixes=CHECK,IGNORE
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c --check-prefixes=CHECK,IGNORE
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ruzmeavf/lib/clang/20/include -nostdsysteminc -emit-llvm -triple x86_64 -fsanitize=address,alignment -fsanitize-ignorelist=a.list a.c -o -
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c:35:16: error: IGNORE-NOT: excluded string found in input
// IGNORE-NOT: @___asan_gen_
               ^
<stdin>:9:1: note: found here
@___asan_gen_ = private constant [4 x i8] c"a.c\00", align 1
^~~~~~~~~~~~~

Input file: <stdin>
Check file: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/CodeGen/sanitize-ignorelist-mainfile.c

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

Input was:
<<<<<<
        1: ; ModuleID = 'a.c' 
        2: source_filename = "a.c" 
        3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" 
        4: target triple = "x86_64" 
        5:  
        6: @global_h = global i32 0, no_sanitize_address, align 4 
        7: @global_c = global i32 0, no_sanitize_address, align 4 
        8: @llvm.used = appending global [1 x ptr] [ptr @asan.module_ctor], section "llvm.metadata" 
        9: @___asan_gen_ = private constant [4 x i8] c"a.c\00", align 1 

```

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


More information about the llvm-commits mailing list