Fix use-after-free in SymbolTable::replaceAllSymbolUses
authorMehdi Amini <joker.eph@gmail.com>
Tue, 2 Aug 2022 22:18:36 +0000 (22:18 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Tue, 2 Aug 2022 22:30:17 +0000 (22:30 +0000)
commit4f0262c1640531dd431cf205f4b802b1fabb6489
tree3451faf90af117ea1aa26424caea0593de983432
parenta5605f1f6853ee26456895f6055fa5e11a875de0
Fix use-after-free in SymbolTable::replaceAllSymbolUses

In some cases the recursion will grow the `visited` hash table and
invalidate the cached iterator.
(caught with ASAN)

Differential Revision: https://reviews.llvm.org/D131027
mlir/lib/IR/SubElementInterfaces.cpp