Skip to content

Commit c07e0bd

Browse files
committedJan 16, 2018
[hwasan] Rename sized load/store callbacks to be consistent with ASan.
Summary: __hwasan_load is now __hwasan_loadN. Reviewers: kcc Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D42138 llvm-svn: 322601
1 parent a8e6b88 commit c07e0bd

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed
 

‎llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void HWAddressSanitizer::initializeCallbacks(Module &M) {
194194

195195
HwasanMemoryAccessCallbackSized[AccessIsWrite] =
196196
checkSanitizerInterfaceFunction(M.getOrInsertFunction(
197-
ClMemoryAccessCallbackPrefix + TypeStr + EndingStr,
197+
ClMemoryAccessCallbackPrefix + TypeStr + "N" + EndingStr,
198198
FunctionType::get(IRB.getVoidTy(), {IntptrTy, IntptrTy}, false)));
199199

200200
for (size_t AccessSizeIndex = 0; AccessSizeIndex < kNumberOfAccessSizes;

‎llvm/test/Instrumentation/HWAddressSanitizer/basic.ll

+6-6
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ entry:
134134
define i40 @test_load40(i40* %a) sanitize_hwaddress {
135135
; CHECK-LABEL: @test_load40(
136136
; CHECK: %[[A:[^ ]*]] = ptrtoint i40* %a to i64
137-
; ABORT: call void @__hwasan_load(i64 %[[A]], i64 5)
138-
; RECOVER: call void @__hwasan_load_noabort(i64 %[[A]], i64 5)
137+
; ABORT: call void @__hwasan_loadN(i64 %[[A]], i64 5)
138+
; RECOVER: call void @__hwasan_loadN_noabort(i64 %[[A]], i64 5)
139139
; CHECK: %[[B:[^ ]*]] = load i40, i40* %a
140140
; CHECK: ret i40 %[[B]]
141141

@@ -272,8 +272,8 @@ entry:
272272
define void @test_store40(i40* %a, i40 %b) sanitize_hwaddress {
273273
; CHECK-LABEL: @test_store40(
274274
; CHECK: %[[A:[^ ]*]] = ptrtoint i40* %a to i64
275-
; ABORT: call void @__hwasan_store(i64 %[[A]], i64 5)
276-
; RECOVER: call void @__hwasan_store_noabort(i64 %[[A]], i64 5)
275+
; ABORT: call void @__hwasan_storeN(i64 %[[A]], i64 5)
276+
; RECOVER: call void @__hwasan_storeN_noabort(i64 %[[A]], i64 5)
277277
; CHECK: store i40 %b, i40* %a
278278
; CHECK: ret void
279279

@@ -285,8 +285,8 @@ entry:
285285
define void @test_store_unaligned(i64* %a, i64 %b) sanitize_hwaddress {
286286
; CHECK-LABEL: @test_store_unaligned(
287287
; CHECK: %[[A:[^ ]*]] = ptrtoint i64* %a to i64
288-
; ABORT: call void @__hwasan_store(i64 %[[A]], i64 8)
289-
; RECOVER: call void @__hwasan_store_noabort(i64 %[[A]], i64 8)
288+
; ABORT: call void @__hwasan_storeN(i64 %[[A]], i64 8)
289+
; RECOVER: call void @__hwasan_storeN_noabort(i64 %[[A]], i64 8)
290290
; CHECK: store i64 %b, i64* %a, align 4
291291
; CHECK: ret void
292292

‎llvm/test/Instrumentation/HWAddressSanitizer/with-calls.ll

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ entry:
7474
define i40 @test_load40(i40* %a) sanitize_hwaddress {
7575
; CHECK-LABEL: @test_load40(
7676
; CHECK: %[[A:[^ ]*]] = ptrtoint i40* %a to i64
77-
; ABORT: call void @__hwasan_load(i64 %[[A]], i64 5)
78-
; RECOVER: call void @__hwasan_load_noabort(i64 %[[A]], i64 5)
77+
; ABORT: call void @__hwasan_loadN(i64 %[[A]], i64 5)
78+
; RECOVER: call void @__hwasan_loadN_noabort(i64 %[[A]], i64 5)
7979
; CHECK: %[[B:[^ ]*]] = load i40, i40* %a
8080
; CHECK: ret i40 %[[B]]
8181

@@ -152,8 +152,8 @@ entry:
152152
define void @test_store40(i40* %a, i40 %b) sanitize_hwaddress {
153153
; CHECK-LABEL: @test_store40(
154154
; CHECK: %[[A:[^ ]*]] = ptrtoint i40* %a to i64
155-
; ABORT: call void @__hwasan_store(i64 %[[A]], i64 5)
156-
; RECOVER: call void @__hwasan_store_noabort(i64 %[[A]], i64 5)
155+
; ABORT: call void @__hwasan_storeN(i64 %[[A]], i64 5)
156+
; RECOVER: call void @__hwasan_storeN_noabort(i64 %[[A]], i64 5)
157157
; CHECK: store i40 %b, i40* %a
158158
; CHECK: ret void
159159

0 commit comments

Comments
 (0)
Please sign in to comment.