We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08b4006 commit 914b617Copy full SHA for 914b617
llvm/test/Instrumentation/ThreadSanitizer/capture.ll
@@ -47,6 +47,21 @@ entry:
47
; CHECK: __tsan_write
48
; CHECK: ret void
49
50
+define void @captured3() nounwind uwtable sanitize_thread {
51
+entry:
52
+ %stkobj = alloca [2 x i32], align 8
53
+ ; escapes due to store into global
54
+ store ptr %stkobj, ptr @sink, align 8
55
+ ; derived is captured as its base object is captured
56
+ %derived = getelementptr inbounds i32, ptr %stkobj, i64 1
57
+ store i32 42, ptr %derived, align 4
58
+ ret void
59
+}
60
+; CHECK-LABEL: define void @captured3
61
+; CHECK: __tsan_write
62
63
+; CHECK: ret void
64
+
65
define void @notcaptured0() nounwind uwtable sanitize_thread {
66
entry:
67
%ptr = alloca i32, align 4
0 commit comments