mirror of
https://git.freebsd.org/ports.git
synced 2025-07-09 05:19:16 -04:00
A couple patchs are included from HEAD that didn't make the release, but fix use-after-free bugs. Submitted by: Emil Mikulic <emil at cs dot rmit dot edu dot au>
21 lines
685 B
C++
21 lines
685 B
C++
Author: dpatel
|
|
Date: Thu Sep 20 18:01:50 2007
|
|
New Revision: 42178
|
|
|
|
Log:
|
|
Don't increment invalid iterator.
|
|
|
|
==============================================================================
|
|
--- lib/Transforms/Scalar/LoopIndexSplit.cpp (original)
|
|
+++ lib/Transforms/Scalar/LoopIndexSplit.cpp Thu Sep 20 18:01:50 2007
|
|
@@ -928,8 +928,9 @@
|
|
while (!WorkList.empty()) {
|
|
BasicBlock *BB = WorkList.back(); WorkList.pop_back();
|
|
for(BasicBlock::iterator BBI = BB->begin(), BBE = BB->end();
|
|
- BBI != BBE; ++BBI) {
|
|
+ BBI != BBE; ) {
|
|
Instruction *I = BBI;
|
|
+ ++BBI;
|
|
I->replaceAllUsesWith(UndefValue::get(I->getType()));
|
|
I->eraseFromParent();
|
|
}
|