Skip to content

Commit b9128d4

Browse files
IRGen: Disable ASan for the auto dynamic replacement array
1 parent fef7f53 commit b9128d4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/IRGen/GenDecl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,6 +1991,7 @@ void IRGenerator::emitDynamicReplacements() {
19911991
"\x01l_auto_dynamic_replacements", IGM.getPointerAlignment(),
19921992
/*isConstant*/ true, llvm::GlobalValue::PrivateLinkage);
19931993
autoReplVar->setSection(getDynamicReplacementSection(IGM));
1994+
disableAddressSanitizer(IGM, autoReplVar);
19941995
IGM.addUsedGlobal(autoReplVar);
19951996

19961997
if (origFuncTypes.empty())

test/IRGen/dynamic_replaceable.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// CHECK: @"\01l_auto_dynamic_replacements" = private constant { i32, i32, [2 x i32] }
2525
// CHECK-SAME: { i32 0, i32 1,
2626
// CHECK-SAME: [2 x i32] [{{.*}}@"\01l_unnamed_dynamic_replacements"{{.*}}, i32 0]
27-
// CHECK-SAME: }, section "__TEXT, __swift5_replace, regular, no_dead_strip"
27+
// CHECK-SAME: }, section "__TEXT, __swift5_replace, regular, no_dead_strip", no_sanitize_address
2828

2929
// CHECK-LABEL: define swiftcc void @test_dynamically_replaceable()
3030
// CHECK-NEXT: entry:

0 commit comments

Comments
 (0)