[LLVMbugs] [Bug 2596] New: valgrind error in VirtRegMap.cpp

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jul 25 09:59:34 PDT 2008


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

           Summary: valgrind error in VirtRegMap.cpp
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: compile-fail
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: gohman at apple.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=1863)
 --> (http://llvm.org/bugs/attachment.cgi?id=1863)
reduced testcase

valgrind turned up an out-of-bounds access in VirtRegMap.cpp.
The following assert demonstrates it, with the attached testcase
Compile with llc -march=x86.

--- lib/CodeGen/VirtRegMap.cpp
+++ lib/CodeGen/VirtRegMap.cpp
@@ -562,6 +562,7 @@ static void InvalidateKills(MachineInstr &MI,
BitVector &RegKills,
    unsigned Reg = MO.getReg();
    if (KillRegs)
      KillRegs->push_back(Reg);
+    assert(Reg < KillOps.size());
    if (KillOps[Reg] == &MO) {
      RegKills.reset(Reg);
      KillOps[Reg] = NULL;


-- 
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