[LLVMbugs] [Bug 13148] New: StringMap: Possible infinite loop in FindKey/LookupBucketFor

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 19 07:17:43 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13148

             Bug #: 13148
           Summary: StringMap: Possible infinite loop in
                    FindKey/LookupBucketFor
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Support Libraries
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: alexbolz at web.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


In lib/Support/StringMap.h, SVN revision 158719:

Line 190:

   if (NumItems*4 > NumBuckets*3)

should read

   if ((NumItems + NumTombstones)*4 > NumBuckets*3)

to take the number of tombstones into account, to guarantee
that there is always an empty slot when a call to FindKey or
LookupBucketFor is made.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list