[LLVMbugs] [Bug 1196] NEW: ValueSymTab::insert can loop infinitely
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Feb 11 10:23:26 PST 2007
http://llvm.org/bugs/show_bug.cgi?id=1196
Summary: ValueSymTab::insert can loop infinitely
Product: libraries
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Core LLVM classes
AssignedTo: unassignedbugs at nondot.org
ReportedBy: rspencer at x10sys.com
When llvm-upgrade calls Value::setName from setValueName it ends up attempting
to insert a value in the symbol table. This can recurse infinitely in this loop:
// Otherwise, there is a naming conflict. Rename this value.
std::string UniqueName = V->getName();
unsigned BaseSize = UniqueName.size();
do {
// Trim any suffix off.
UniqueName.resize(BaseSize);
UniqueName += utostr(++LastUnique);
// Try insert the vmap entry with this suffix.
} while (!vmap.insert(make_pair(UniqueName, V)).second);
Last night's nightly test was halted by this. It looped 22,821,681,606 times
before I broke into it with the debugger. Its unclear why the map is refusing to
insert the new name.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list