[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 18 16:11:53 PST 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang` at step 6 "test-build-unified-tree-check-all".

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

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

```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: CodeGen/ubsan-trap-debugloc.c' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -cc1 -internal-isystem /Users/buildbot/buildbot-root/aarch64-darwin/build/lib/clang/20/include -nostdsysteminc -emit-llvm -disable-llvm-passes -O -fsanitize=signed-integer-overflow -fsanitize-trap=signed-integer-overflow /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/CodeGen/ubsan-trap-debugloc.c -o - -debug-info-kind=line-tables-only | /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/CodeGen/ubsan-trap-debugloc.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -cc1 -internal-isystem /Users/buildbot/buildbot-root/aarch64-darwin/build/lib/clang/20/include -nostdsysteminc -emit-llvm -disable-llvm-passes -O -fsanitize=signed-integer-overflow -fsanitize-trap=signed-integer-overflow /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/CodeGen/ubsan-trap-debugloc.c -o - -debug-info-kind=line-tables-only
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/CodeGen/ubsan-trap-debugloc.c
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/CodeGen/ubsan-trap-debugloc.c:20:11: error: CHECK: expected string not found in input
// CHECK: [[LOC]] = !DILocation(line: 0
          ^
<stdin>:75:46: note: scanning from here
 call void @llvm.ubsantrap(i8 0) #4, !dbg !25, !nosanitize !8
                                             ^
<stdin>:75:46: note: with "LOC" equal to "!14"
 call void @llvm.ubsantrap(i8 0) #4, !dbg !25, !nosanitize !8
                                             ^
<stdin>:106:3: note: possible intended match here
!13 = !DILocation(line: 7, column: 7, scope: !5)
  ^

Input file: <stdin>
Check file: /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/CodeGen/ubsan-trap-debugloc.c

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

Input was:
<<<<<<
            1: ; ModuleID = '/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/CodeGen/ubsan-trap-debugloc.c' 
            2: source_filename = "/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/CodeGen/ubsan-trap-debugloc.c" 
            3: target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32" 
            4: target triple = "arm64-apple-darwin23.6.0" 
            5:  
            6:  at .src = private unnamed_addr constant [99 x i8] c"/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/CodeGen/ubsan-trap-debugloc.c\00", align 1 
            7:  at 0 = private unnamed_addr constant { i16, i16, [6 x i8] } { i16 0, i16 11, [6 x i8] c"'int'\00" } 
            8:  
            9: ; Function Attrs: nounwind 
           10: define void  at foo(i32 noundef %a) #0 !dbg !5 { 
label:5'0                  ^~~~
label:5'1                  ^~~~
           11: entry: 
           12:  %a.addr = alloca i32, align 4 
           13:  store volatile i32 %a, ptr %a.addr, align 4, !tbaa !9 
           14:  %0 = load volatile i32, ptr %a.addr, align 4, !dbg !13, !tbaa !9 
           15:  %1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 1), !dbg !14, !nosanitize !8 
           16:  %2 = extractvalue { i32, i1 } %1, 0, !dbg !14, !nosanitize !8 
           17:  %3 = extractvalue { i32, i1 } %1, 1, !dbg !14, !nosanitize !8 
           18:  %4 = xor i1 %3, true, !dbg !14, !nosanitize !8 
           19:  br i1 %4, label %cont, label %trap, !dbg !14, !nosanitize !8 
           20:  
...

```

</details>

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


More information about the cfe-commits mailing list