[LLVMbugs] [Bug 3846] New: PrologEpilogInserter:: replaceFrameIndices reads past last instruction in basic block

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Mar 19 11:55:47 PDT 2009


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

           Summary: PrologEpilogInserter::replaceFrameIndices reads past
                    last instruction in basic block
           Product: libraries
           Version: 2.5
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: just.s0m3.guy+llvmbugzilla at gmail.com
                CC: llvmbugs at cs.uiuc.edu


This bug is similar to bug 3842.

In certain cases, the replaceFrameIndices walks off the end of the instruction
iterator at line 573 of
http://llvm.org/viewvc/llvm-project/llvm/tags/RELEASE_25/lib/CodeGen/PrologEpilogInserter.cpp?annotate=65926,
due to an unchecked ++I.

The solution is to check that I is not the end of the block before
incrementing. I.e. replace line 573 with:

if (DoIncr && BB->end != I) ++I;


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