[Mlir-commits] [mlir] Fix llvm-mlir-use-after-erase findings (PR #210733)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Jul 27 23:10:00 PDT 2026
================
@@ -1648,10 +1648,10 @@ class mlir::BytecodeReader::Impl {
return failure();
continue;
}
- op->dropAllReferences();
- op->erase();
lazyLoadableOps.pop_front();
lazyLoadableOpsMap.erase(op);
+ op->dropAllReferences();
+ op->erase();
----------------
Harald-R wrote:
You are right. The pointer of the operation remains the same even after `erase()` is called, so the `lazyLoadableOpsMap` can still use it. I'll have to revisit this logic in the check, so that it only detects cases when an operation is dereferenced after erasure.
https://github.com/llvm/llvm-project/pull/210733
More information about the Mlir-commits
mailing list