[PATCH] D28412: Fix use after free
Xin Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 13:46:50 PST 2017
trentxintong created this revision.
trentxintong added reviewers: chenli, atrick, hfinkel, mzolotukhin.
trentxintong added a subscriber: llvm-commits.
Fix use after free in LoopUnswitch
https://reviews.llvm.org/D28412
Files:
lib/Transforms/Scalar/LoopUnswitch.cpp
Index: lib/Transforms/Scalar/LoopUnswitch.cpp
===================================================================
--- lib/Transforms/Scalar/LoopUnswitch.cpp
+++ lib/Transforms/Scalar/LoopUnswitch.cpp
@@ -1382,8 +1382,8 @@
Pred->getInstList().splice(BI->getIterator(), Succ->getInstList(),
Succ->begin(), Succ->end());
LPM->deleteSimpleAnalysisValue(BI, L);
- BI->eraseFromParent();
RemoveFromWorklist(BI, Worklist);
+ BI->eraseFromParent();
// Remove Succ from the loop tree.
LI->removeBlock(Succ);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28412.83419.patch
Type: text/x-patch
Size: 596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170106/fd02f290/attachment.bin>
More information about the llvm-commits
mailing list