[llvm] [llvm] Fix potential null dereference in IR/Verifier (PR #157458)
Daniel Kuts via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 8 06:28:09 PDT 2025
https://github.com/apach301 created https://github.com/llvm/llvm-project/pull/157458
Fixes #157448
>From 8ecbd8a53d15792737b1dcb0f1ae6178d9bebbee Mon Sep 17 00:00:00 2001
From: Daniil Kutz <kutz at ispras.ru>
Date: Mon, 8 Sep 2025 16:07:53 +0300
Subject: [PATCH] [llvm] Fix potential null dereference in IR/Verifier
---
llvm/lib/IR/Verifier.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index f38871f09f35f..57ea5b53647aa 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -3188,7 +3188,7 @@ void Verifier::visitFunction(const Function &F) {
if (SP && ((Scope != SP) && !Seen.insert(SP).second))
return;
- CheckDI(SP->describes(&F),
+ CheckDI(SP && SP->describes(&F),
"!dbg attachment points at wrong subprogram for function", N, &F,
&I, DL, Scope, SP);
};
More information about the llvm-commits
mailing list