[Mlir-commits] [mlir] [mlir][sparse] fix stack UAF (PR #79353)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jan 24 12:08:27 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-sparse

Author: Peiming Liu (PeimingLiu)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/79353.diff


1 Files Affected:

- (modified) mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorLevel.cpp (+1-2) 


``````````diff
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorLevel.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorLevel.cpp
index 22e65be8782fb4e..226cccbc422b9b6 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorLevel.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorLevel.cpp
@@ -862,14 +862,13 @@ ValueRange FilterIterator::forward(OpBuilder &b, Location l) {
 
   SmallVector<Value> whileArgs(getItVals().begin(), getItVals().end());
   whileArgs.push_back(isFirst);
-
   auto whileOp = b.create<scf::WhileOp>(
       l, ValueRange(whileArgs).getTypes(), whileArgs,
       /*beforeBuilder=*/
       [this](OpBuilder &b, Location l, ValueRange ivs) {
         ValueRange isFirst = linkNewScope(ivs);
         assert(isFirst.size() == 1);
-        ValueRange cont =
+        scf::ValueVector cont =
             genWhenInBound(b, l, *wrap, C_FALSE,
                            [this, isFirst](OpBuilder &b, Location l,
                                            Value wrapCrd) -> scf::ValueVector {

``````````

</details>


https://github.com/llvm/llvm-project/pull/79353


More information about the Mlir-commits mailing list