[Mlir-commits] [mlir] 48cf6b6 - [mlir] Fix use-after-free introduced in a9efcbf490d9b8f46ec37062ca8653b4068000e5.
Christian Sigg
llvmlistbot at llvm.org
Sun Jun 23 09:57:56 PDT 2024
Author: Christian Sigg
Date: 2024-06-23T18:56:23+02:00
New Revision: 48cf6b6bbe7a22bfcd98f82dc7afd21c9decd22f
URL: https://github.com/llvm/llvm-project/commit/48cf6b6bbe7a22bfcd98f82dc7afd21c9decd22f
DIFF: https://github.com/llvm/llvm-project/commit/48cf6b6bbe7a22bfcd98f82dc7afd21c9decd22f.diff
LOG: [mlir] Fix use-after-free introduced in a9efcbf490d9b8f46ec37062ca8653b4068000e5.
Added:
Modified:
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
index 37467db568c27..4ef27b1d09127 100644
--- a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
+++ b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
@@ -2335,10 +2335,10 @@ SplitOp::apply(transform::TransformRewriter &rewriter,
};
auto checkFailureInSplitting =
- [&](bool hasFailed, Location loc) -> DiagnosedSilenceableFailure {
+ [&](bool hasFailed, Operation *op) -> DiagnosedSilenceableFailure {
if (hasFailed) {
auto diag = emitDefiniteFailure() << "internal failure in splitting";
- diag.attachNote(loc) << "target op";
+ diag.attachNote(op->getLoc()) << "target op";
return diag;
}
return DiagnosedSilenceableFailure::success();
@@ -2376,7 +2376,7 @@ SplitOp::apply(transform::TransformRewriter &rewriter,
// Propagate errors.
DiagnosedSilenceableFailure diag =
- checkFailureInSplitting(!head && !tail, target->getLoc());
+ checkFailureInSplitting(!head && !tail, target);
if (diag.isDefiniteFailure())
return diag;
@@ -2408,8 +2408,8 @@ SplitOp::apply(transform::TransformRewriter &rewriter,
getDimension(), std::get<1>(pair));
// Propagate errors.
- DiagnosedSilenceableFailure diagSplit = checkFailureInSplitting(
- !first.back() && !second.back(), target->getLoc());
+ DiagnosedSilenceableFailure diagSplit =
+ checkFailureInSplitting(!first.back() && !second.back(), target);
if (diagSplit.isDefiniteFailure())
return diag;
More information about the Mlir-commits
mailing list