Fix PR9039, a use-after-free in reassociate. The issue was that the
authorDuncan Sands <baldrick@free.fr>
Wed, 26 Jan 2011 10:08:38 +0000 (10:08 +0000)
committerDuncan Sands <baldrick@free.fr>
Wed, 26 Jan 2011 10:08:38 +0000 (10:08 +0000)
commit37f87c7aa914fba1362bb187ce5a386abfe94e39
treeb51c37ad037c9dd56ef135199408281a8803b7b3
parentf6c63c23203ca4c4aa89efa2bff722bb479cfe3c
Fix PR9039, a use-after-free in reassociate.  The issue was that the
operand being factorized (and erased) could occur several times in Ops,
resulting in freed memory being used when the next occurrence in Ops was
analyzed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124287 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/Reassociate.cpp
test/Transforms/Reassociate/2011-01-26-UseAfterFree.ll [new file with mode: 0644]