[Mlir-commits] [mlir] 671455a - [mlir] Fix possible null dereference during error logging (#157455)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Sep 9 18:10:16 PDT 2025
Author: Daniel Kuts
Date: 2025-09-10T09:10:11+08:00
New Revision: 671455ae3fa97fff65cecdbec8b259eb0a55a574
URL: https://github.com/llvm/llvm-project/commit/671455ae3fa97fff65cecdbec8b259eb0a55a574
DIFF: https://github.com/llvm/llvm-project/commit/671455ae3fa97fff65cecdbec8b259eb0a55a574.diff
LOG: [mlir] Fix possible null dereference during error logging (#157455)
Fixes #157451
Added:
Modified:
mlir/lib/Conversion/MPIToLLVM/MPIToLLVM.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Conversion/MPIToLLVM/MPIToLLVM.cpp b/mlir/lib/Conversion/MPIToLLVM/MPIToLLVM.cpp
index e5496e53ae529..aa47e398eb684 100644
--- a/mlir/lib/Conversion/MPIToLLVM/MPIToLLVM.cpp
+++ b/mlir/lib/Conversion/MPIToLLVM/MPIToLLVM.cpp
@@ -405,7 +405,8 @@ std::unique_ptr<MPIImplTraits> MPIImplTraits::get(ModuleOp &moduleOp) {
return std::make_unique<OMPIImplTraits>(moduleOp);
if (!strAttr || strAttr.getValue() != "MPICH")
moduleOp.emitWarning() << "Unknown \"MPI:Implementation\" value in DLTI ("
- << strAttr.getValue() << "), defaulting to MPICH";
+ << (strAttr ? strAttr.getValue() : "<NULL>")
+ << "), defaulting to MPICH";
return std::make_unique<MPICHImplTraits>(moduleOp);
}
More information about the Mlir-commits
mailing list