[Lldb-commits] [lldb] r191555 - If you erase while iterating, remember to update the iterator. Bug found by Carlo Kok.
Jim Ingham
jingham at apple.com
Fri Sep 27 13:58:17 PDT 2013
Author: jingham
Date: Fri Sep 27 15:58:17 2013
New Revision: 191555
URL: http://llvm.org/viewvc/llvm-project?rev=191555&view=rev
Log:
If you erase while iterating, remember to update the iterator. Bug found by Carlo Kok.
Modified:
lldb/trunk/source/Symbol/Symtab.cpp
Modified: lldb/trunk/source/Symbol/Symtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=191555&r1=191554&r2=191555&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symtab.cpp (original)
+++ lldb/trunk/source/Symbol/Symtab.cpp Fri Sep 27 15:58:17 2013
@@ -682,7 +682,7 @@ Symtab::AppendSymbolIndexesWithNameAndTy
if (symbol_type == eSymbolTypeAny || m_symbols[*pos].GetType() == symbol_type)
++pos;
else
- indexes.erase(pos);
+ pos = indexes.erase(pos);
}
}
return indexes.size();
@@ -701,7 +701,7 @@ Symtab::AppendSymbolIndexesWithNameAndTy
if (symbol_type == eSymbolTypeAny || m_symbols[*pos].GetType() == symbol_type)
++pos;
else
- indexes.erase(pos);
+ pos = indexes.erase(pos);
}
}
return indexes.size();
More information about the lldb-commits
mailing list