[llvm] r322601 - [hwasan] Rename sized load/store callbacks to be consistent with ASan.
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 16 15:15:08 PST 2018
Author: eugenis
Date: Tue Jan 16 15:15:08 2018
New Revision: 322601
URL: http://llvm.org/viewvc/llvm-project?rev=322601&view=rev
Log:
[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
Modified:
llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
llvm/trunk/test/Instrumentation/HWAddressSanitizer/basic.ll
llvm/trunk/test/Instrumentation/HWAddressSanitizer/with-calls.ll
Modified: llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp?rev=322601&r1=322600&r2=322601&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp Tue Jan 16 15:15:08 2018
@@ -194,7 +194,7 @@ void HWAddressSanitizer::initializeCallb
HwasanMemoryAccessCallbackSized[AccessIsWrite] =
checkSanitizerInterfaceFunction(M.getOrInsertFunction(
- ClMemoryAccessCallbackPrefix + TypeStr + EndingStr,
+ ClMemoryAccessCallbackPrefix + TypeStr + "N" + EndingStr,
FunctionType::get(IRB.getVoidTy(), {IntptrTy, IntptrTy}, false)));
for (size_t AccessSizeIndex = 0; AccessSizeIndex < kNumberOfAccessSizes;
Modified: llvm/trunk/test/Instrumentation/HWAddressSanitizer/basic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/HWAddressSanitizer/basic.ll?rev=322601&r1=322600&r2=322601&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/HWAddressSanitizer/basic.ll (original)
+++ llvm/trunk/test/Instrumentation/HWAddressSanitizer/basic.ll Tue Jan 16 15:15:08 2018
@@ -134,8 +134,8 @@ entry:
define i40 @test_load40(i40* %a) sanitize_hwaddress {
; CHECK-LABEL: @test_load40(
; CHECK: %[[A:[^ ]*]] = ptrtoint i40* %a to i64
-; ABORT: call void @__hwasan_load(i64 %[[A]], i64 5)
-; RECOVER: call void @__hwasan_load_noabort(i64 %[[A]], i64 5)
+; ABORT: call void @__hwasan_loadN(i64 %[[A]], i64 5)
+; RECOVER: call void @__hwasan_loadN_noabort(i64 %[[A]], i64 5)
; CHECK: %[[B:[^ ]*]] = load i40, i40* %a
; CHECK: ret i40 %[[B]]
@@ -272,8 +272,8 @@ entry:
define void @test_store40(i40* %a, i40 %b) sanitize_hwaddress {
; CHECK-LABEL: @test_store40(
; CHECK: %[[A:[^ ]*]] = ptrtoint i40* %a to i64
-; ABORT: call void @__hwasan_store(i64 %[[A]], i64 5)
-; RECOVER: call void @__hwasan_store_noabort(i64 %[[A]], i64 5)
+; ABORT: call void @__hwasan_storeN(i64 %[[A]], i64 5)
+; RECOVER: call void @__hwasan_storeN_noabort(i64 %[[A]], i64 5)
; CHECK: store i40 %b, i40* %a
; CHECK: ret void
@@ -285,8 +285,8 @@ entry:
define void @test_store_unaligned(i64* %a, i64 %b) sanitize_hwaddress {
; CHECK-LABEL: @test_store_unaligned(
; CHECK: %[[A:[^ ]*]] = ptrtoint i64* %a to i64
-; ABORT: call void @__hwasan_store(i64 %[[A]], i64 8)
-; RECOVER: call void @__hwasan_store_noabort(i64 %[[A]], i64 8)
+; ABORT: call void @__hwasan_storeN(i64 %[[A]], i64 8)
+; RECOVER: call void @__hwasan_storeN_noabort(i64 %[[A]], i64 8)
; CHECK: store i64 %b, i64* %a, align 4
; CHECK: ret void
Modified: llvm/trunk/test/Instrumentation/HWAddressSanitizer/with-calls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/HWAddressSanitizer/with-calls.ll?rev=322601&r1=322600&r2=322601&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/HWAddressSanitizer/with-calls.ll (original)
+++ llvm/trunk/test/Instrumentation/HWAddressSanitizer/with-calls.ll Tue Jan 16 15:15:08 2018
@@ -74,8 +74,8 @@ entry:
define i40 @test_load40(i40* %a) sanitize_hwaddress {
; CHECK-LABEL: @test_load40(
; CHECK: %[[A:[^ ]*]] = ptrtoint i40* %a to i64
-; ABORT: call void @__hwasan_load(i64 %[[A]], i64 5)
-; RECOVER: call void @__hwasan_load_noabort(i64 %[[A]], i64 5)
+; ABORT: call void @__hwasan_loadN(i64 %[[A]], i64 5)
+; RECOVER: call void @__hwasan_loadN_noabort(i64 %[[A]], i64 5)
; CHECK: %[[B:[^ ]*]] = load i40, i40* %a
; CHECK: ret i40 %[[B]]
@@ -152,8 +152,8 @@ entry:
define void @test_store40(i40* %a, i40 %b) sanitize_hwaddress {
; CHECK-LABEL: @test_store40(
; CHECK: %[[A:[^ ]*]] = ptrtoint i40* %a to i64
-; ABORT: call void @__hwasan_store(i64 %[[A]], i64 5)
-; RECOVER: call void @__hwasan_store_noabort(i64 %[[A]], i64 5)
+; ABORT: call void @__hwasan_storeN(i64 %[[A]], i64 5)
+; RECOVER: call void @__hwasan_storeN_noabort(i64 %[[A]], i64 5)
; CHECK: store i40 %b, i40* %a
; CHECK: ret void
More information about the llvm-commits
mailing list