1414target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
1515target triple = "x86_64-unknown-linux-gnu"
1616
17- ; ORIGIN: [[D:@[0-9]+]] = private global [13 x i8] c"----unique_x\00"
17+ ; ORIGIN: [[IDPTR:@[0-9]+]] = private global i32 0
18+ ; ORIGIN: [[DESCR:@[0-9]+]] = private constant [9 x i8] c"unique_x\00"
1819
1920define void @static () sanitize_memory {
2021entry:
2526; CHECK-LABEL: define void @static(
2627; INLINE: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 -1, i64 4, i1 false)
2728; CALL: call void @__msan_poison_stack(i8* {{.*}}, i64 4)
28- ; ORIGIN: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 4, i8* {{.*}} [[D ]],
29+ ; ORIGIN: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 4, i8* {{.*}} [[IDPTR]] {{.*}}, i8* {{.*}} [[DESCR ]],
2930; KMSAN: call void @__msan_poison_alloca(i8* {{.*}}, i64 4,
3031; CHECK: ret void
3132
4142; CHECK-LABEL: define void @dynamic(
4243; INLINE: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 -1, i64 4, i1 false)
4344; CALL: call void @__msan_poison_stack(i8* {{.*}}, i64 4)
44- ; ORIGIN: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 4,
45+ ; ORIGIN: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 4,
4546; KMSAN: call void @__msan_poison_alloca(i8* {{.*}}, i64 4,
4647; CHECK: ret void
4748
5455; CHECK-LABEL: define void @array(
5556; INLINE: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 -1, i64 20, i1 false)
5657; CALL: call void @__msan_poison_stack(i8* {{.*}}, i64 20)
57- ; ORIGIN: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 20,
58+ ; ORIGIN: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 20,
5859; KMSAN: call void @__msan_poison_alloca(i8* {{.*}}, i64 20,
5960; CHECK: ret void
6061
6869; CHECK: %[[A:.*]] = mul i64 4, %cnt
6970; INLINE: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 -1, i64 %[[A]], i1 false)
7071; CALL: call void @__msan_poison_stack(i8* {{.*}}, i64 %[[A]])
71- ; ORIGIN: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 %[[A]],
72+ ; ORIGIN: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 %[[A]],
7273; KMSAN: call void @__msan_poison_alloca(i8* {{.*}}, i64 %[[A]],
7374; CHECK: ret void
7475
8283; CHECK-LABEL: define void @unpoison_local(
8384; INLINE: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 0, i64 20, i1 false)
8485; CALL: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 0, i64 20, i1 false)
85- ; ORIGIN-NOT: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 20,
86+ ; ORIGIN-NOT: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 20,
8687; KMSAN: call void @__msan_unpoison_alloca(i8* {{.*}}, i64 20)
8788; CHECK: ret void
8889
@@ -111,13 +112,13 @@ another_bb:
111112; CHECK: call void @llvm.lifetime.start
112113; INLINE: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 -1, i64 4, i1 false)
113114; CALL: call void @__msan_poison_stack(i8* {{.*}}, i64 4)
114- ; ORIGIN: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 4,
115+ ; ORIGIN: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 4,
115116; KMSAN: call void @__msan_poison_alloca(i8* {{.*}}, i64 4,
116117
117118; CHECK: call void @llvm.lifetime.start
118119; INLINE: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 -1, i64 4, i1 false)
119120; CALL: call void @__msan_poison_stack(i8* {{.*}}, i64 4)
120- ; ORIGIN: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 4,
121+ ; ORIGIN: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 4,
121122; KMSAN: call void @__msan_poison_alloca(i8* {{.*}}, i64 4,
122123; CHECK: ret void
123124
@@ -138,7 +139,7 @@ entry:
138139; CHECK: %[[A:.*]] = mul i64 4, %cnt
139140; INLINE: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 -1, i64 %[[A]], i1 false)
140141; CALL: call void @__msan_poison_stack(i8* {{.*}}, i64 %[[A]])
141- ; ORIGIN: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 %[[A]],
142+ ; ORIGIN: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 %[[A]],
142143; KMSAN: call void @__msan_poison_alloca(i8* {{.*}}, i64 %[[A]],
143144; CHECK: call void @llvm.lifetime.end
144145; CHECK: ret void
@@ -178,36 +179,36 @@ another_bb:
178179; CHECK: %x = alloca i32
179180; INLINE: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 -1, i64 4, i1 false)
180181; CALL: call void @__msan_poison_stack(i8* {{.*}}, i64 4)
181- ; ORIGIN: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 4,
182+ ; ORIGIN: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 4,
182183; KMSAN: call void @__msan_poison_alloca(i8* {{.*}}, i64 4,
183184; CHECK: %y = alloca i32
184185; INLINE: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 -1, i64 4, i1 false)
185186; CALL: call void @__msan_poison_stack(i8* {{.*}}, i64 4)
186- ; ORIGIN: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 4,
187+ ; ORIGIN: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 4,
187188; KMSAN: call void @__msan_poison_alloca(i8* {{.*}}, i64 4,
188189; CHECK: %z = alloca i32
189190; INLINE: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 -1, i64 4, i1 false)
190191; CALL: call void @__msan_poison_stack(i8* {{.*}}, i64 4)
191- ; ORIGIN: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 4,
192+ ; ORIGIN: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 4,
192193; KMSAN: call void @__msan_poison_alloca(i8* {{.*}}, i64 4,
193194
194195; There're two lifetime intrinsics for %z, but we must instrument it only once.
195196; INLINE-NOT: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 -1, i64 4, i1 false)
196197; CALL-NOT: call void @__msan_poison_stack(i8* {{.*}}, i64 4)
197- ; ORIGIN-NOT: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 4,
198+ ; ORIGIN-NOT: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 4,
198199; KMSAN-NOT: call void @__msan_poison_alloca(i8* {{.*}}, i64 4,
199200; CHECK-LABEL: another_bb:
200201
201202; CHECK: call void @llvm.lifetime.start
202203; INLINE-NOT: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 -1, i64 4, i1 false)
203204; CALL-NOT: call void @__msan_poison_stack(i8* {{.*}}, i64 4)
204- ; ORIGIN-NOT: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 4,
205+ ; ORIGIN-NOT: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 4,
205206; KMSAN-NOT: call void @__msan_poison_alloca(i8* {{.*}}, i64 4,
206207; CHECK: call void @llvm.lifetime.end
207208; CHECK: call void @llvm.lifetime.start
208209; INLINE-NOT: call void @llvm.memset.p0i8.i64(i8* align 4 {{.*}}, i8 -1, i64 4, i1 false)
209210; CALL-NOT: call void @__msan_poison_stack(i8* {{.*}}, i64 4)
210- ; ORIGIN-NOT: call void @__msan_set_alloca_origin (i8* {{.*}}, i64 4,
211+ ; ORIGIN-NOT: call void @__msan_set_alloca_origin_with_descr (i8* {{.*}}, i64 4,
211212; KMSAN-NOT: call void @__msan_poison_alloca(i8* {{.*}}, i64 4,
212213; CHECK: call void @llvm.lifetime.end
213214
0 commit comments