[LLVMbugs] [Bug 2226] New: use of uninitialized variables in SimpleRegisterCoalescing. cpp

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Apr 15 18:06:50 PDT 2008


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

           Summary: use of uninitialized variables in
                    SimpleRegisterCoalescing.cpp
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          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


SimpleRegisterCoalescing.cpp at line 1937 calls TargetInstrInfo::isMoveInstr
to get the source and destination registers of a move without checking
the result value to see if the instruction was actually a move. It looks like
it should be, but currently there are cases where this assumption doesn't
hold. When it doesn't the following code ends up referencing the
variables uninitialized.

For example, when compiling
test/CodeGen/Generic/2003-07-08-BadCastToBool.ll
on x86 the code at line 1073 inserts a non-move instruction into
JoinedCopies.

The attached patch demonstrates the problem by using an assert.


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