[llvm-commits] [PATCH 4/5] Reset StringMap's NumTombstones on clears and rehashes.

jfonseca at vmware.com jfonseca at vmware.com
Thu Mar 24 07:30:37 PDT 2011


StringMap was not properly updating NumTombstones after a clear or rehash.

This was not fatal until now because the table was growing faster than
NumTombstones could, but with the previous change of preventing infinite
growth of the table the invariant (NumItems + NumTombstones <= NumBuckets)
stopped being observed, causing infinite loops in certain situations.
---
 include/llvm/ADT/StringMap.h |    3 +++
 lib/Support/StringMap.cpp    |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Reset-StringMap-s-NumTombstones-on-clears-and-rehash.patch
Type: text/x-patch
Size: 1351 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110324/bd37db50/attachment.bin>


More information about the llvm-commits mailing list