aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2024-01-02 13:57:05 -0800
committerGitHub <noreply@github.com>2024-01-02 13:57:05 -0800
commit78f0991abdae723f535fda58a4bb16b53bea7010 (patch)
tree59ef7a442e09a255fc18eff52911b6ad4efedbea /llvm/lib/IR
parentc0345b4648608b44071bbb6b012b24bd07c3d29e (diff)
downloadllvm-78f0991abdae723f535fda58a4bb16b53bea7010.zip
llvm-78f0991abdae723f535fda58a4bb16b53bea7010.tar.gz
llvm-78f0991abdae723f535fda58a4bb16b53bea7010.tar.bz2
[hwasan] Workaround unsupported AssignmentTrackingPass (#76547)
Temporarily fix for issue #76545 Hwasan does not attach tags to @llvm.dbg.assign. It's not clear if we can attach tags to @llvm.dbg.assign. For now we just disable the path replacing llvm.dbg.declare with llvm.dbg.assign. It may reduce the quality of interactive debugging with HWASAN, but usually it's a smaller priority for sanitizers than the quality if reports.
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index eab05ee..c6dc42e 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -2115,6 +2115,10 @@ bool AssignmentTrackingPass::runOnFunction(Function &F) {
if (F.hasFnAttribute(Attribute::OptimizeNone))
return /*Changed*/ false;
+ // FIXME: https://github.com/llvm/llvm-project/issues/76545
+ if (F.hasFnAttribute(Attribute::SanitizeHWAddress))
+ return /*Changed*/ false;
+
bool Changed = false;
auto *DL = &F.getParent()->getDataLayout();
// Collect a map of {backing storage : dbg.declares} (currently "backing