[PATCH] D55899: [asan] Undo special treatment of linkonce_odr and weak_odr
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 19 13:21:07 PST 2018
vitalybuka updated this revision to Diff 178949.
vitalybuka added a comment.
update a test
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55899/new/
https://reviews.llvm.org/D55899
Files:
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/win-string-literal.ll
Index: llvm/test/Instrumentation/AddressSanitizer/win-string-literal.ll
===================================================================
--- llvm/test/Instrumentation/AddressSanitizer/win-string-literal.ll
+++ llvm/test/Instrumentation/AddressSanitizer/win-string-literal.ll
@@ -15,7 +15,7 @@
; CHECK-SAME: { i64 ptrtoint ({ [5 x i8], [59 x i8] }* @"??_C at _04JIHMPGLA@asdf?$AA@" to i64),
; CHECK-SAME: i64 5, i64 64, i64 ptrtoint ([17 x i8]* @___asan_gen_.1 to i64),
; CHECK-SAME: i64 ptrtoint ([8 x i8]* @___asan_gen_ to i64), i64 0,
-; CHECK-SAME: i64 ptrtoint ({ [6 x i8]*, i32, i32 }* @___asan_gen_.3 to i64), i64 -1 },
+; CHECK-SAME: i64 ptrtoint ({ [6 x i8]*, i32, i32 }* @___asan_gen_.3 to i64), i64 0 },
; CHECK-SAME: section ".ASAN$GL", comdat($"??_C at _04JIHMPGLA@asdf?$AA@"), align 64
; ModuleID = 't.cpp'
Index: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
===================================================================
--- llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -2201,10 +2201,8 @@
GlobalAlias::create(GlobalValue::PrivateLinkage, "", NewGlobal);
}
- // ODR check is not useful for the following, but we see false reports
- // caused by linker optimizations.
- if (NewGlobal->hasLocalLinkage() || NewGlobal->hasLinkOnceODRLinkage() ||
- NewGlobal->hasWeakODRLinkage()) {
+ // ODR should not happen for local linkage.
+ if (NewGlobal->hasLocalLinkage()) {
ODRIndicator = ConstantExpr::getIntToPtr(ConstantInt::get(IntptrTy, -1),
IRB.getInt8PtrTy());
} else if (UseOdrIndicator) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55899.178949.patch
Type: text/x-patch
Size: 1708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181219/c48087db/attachment.bin>
More information about the llvm-commits
mailing list