[Mlir-commits] [mlir] 2b31c5e - [mlir] fix use-after-free on error path in transform dialect
Alex Zinenko
llvmlistbot at llvm.org
Fri Jan 6 07:03:05 PST 2023
Author: Alex Zinenko
Date: 2023-01-06T16:02:49+01:00
New Revision: 2b31c5e7686b44958492084bad87318b710a84ed
URL: https://github.com/llvm/llvm-project/commit/2b31c5e7686b44958492084bad87318b710a84ed
DIFF: https://github.com/llvm/llvm-project/commit/2b31c5e7686b44958492084bad87318b710a84ed.diff
LOG: [mlir] fix use-after-free on error path in transform dialect
Added:
Modified:
mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h b/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
index 807b5336aa343..0ac2c457188ee 100644
--- a/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
+++ b/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
@@ -851,10 +851,11 @@ applyTransformToEach(TransformOpTy transformOp, ArrayRef<Operation *> targets,
continue;
}
+ Location specificOpLoc = specificOp->getLoc();
DiagnosedSilenceableFailure res =
transformOp.applyToOne(specificOp, results.back(), state);
if (res.isDefiniteFailure() ||
- failed(detail::checkApplyToOne(transformOp, specificOp->getLoc(),
+ failed(detail::checkApplyToOne(transformOp, specificOpLoc,
results.back()))) {
return DiagnosedSilenceableFailure::definiteFailure();
}
More information about the Mlir-commits
mailing list