File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
test/Instrumentation/HWAddressSanitizer Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,8 @@ void StackInfoBuilder::visit(Instruction &Inst) {
180
180
181
181
bool StackInfoBuilder::isInterestingAlloca (const AllocaInst &AI) {
182
182
return (AI.getAllocatedType ()->isSized () &&
183
+ // FIXME: support vscale.
184
+ !AI.getAllocatedType ()->isScalableTy () &&
183
185
// FIXME: instrument dynamic allocas, too
184
186
AI.isStaticAlloca () &&
185
187
// alloca() may be called with 0 size, ignore it.
Original file line number Diff line number Diff line change @@ -110,6 +110,24 @@ entry:
110
110
ret void , !dbg !24
111
111
}
112
112
113
+ define void @test_vscale_alloca () sanitize_hwaddress {
114
+ ; DYNAMIC-SHADOW-LABEL: define void @test_vscale_alloca(
115
+ ; DYNAMIC-SHADOW-SAME: ) #[[ATTR0]] {
116
+ ; DYNAMIC-SHADOW-NEXT: [[X:%.*]] = alloca <vscale x 4 x i64>, align 32
117
+ ; DYNAMIC-SHADOW-NEXT: call void @use32(ptr nonnull [[X]])
118
+ ; DYNAMIC-SHADOW-NEXT: ret void
119
+ ;
120
+ ; ZERO-BASED-SHADOW-LABEL: define void @test_vscale_alloca(
121
+ ; ZERO-BASED-SHADOW-SAME: ) #[[ATTR0]] {
122
+ ; ZERO-BASED-SHADOW-NEXT: [[X:%.*]] = alloca <vscale x 4 x i64>, align 32
123
+ ; ZERO-BASED-SHADOW-NEXT: call void @use32(ptr nonnull [[X]])
124
+ ; ZERO-BASED-SHADOW-NEXT: ret void
125
+ ;
126
+ %x = alloca <vscale x 4 x i64 >
127
+ call void @use32 (ptr nonnull %x )
128
+ ret void
129
+ }
130
+
113
131
declare void @llvm.dbg.value (metadata , metadata , metadata )
114
132
115
133
!llvm.dbg.cu = !{!0 }
You can’t perform that action at this time.
0 commit comments