[LLVMbugs] [Bug 8463] New: Bus error on Loop::getTripCount if getAnalysis<LoopInfo> is called twice

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 25 18:24:04 PDT 2010


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

           Summary: Bus error on Loop::getTripCount if
                    getAnalysis<LoopInfo> is called twice
           Product: new-bugs
           Version: 2.8
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: Trevor.W.Harmon at nasa.gov
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=5666)
 --> (http://llvm.org/bugs/attachment.cgi?id=5666)
Test case to reproduce crash; run on bitcode containing a loop

The following sequence of events triggers a crash in an LLVM pass:

1. Call getAnalysis<LoopInfo>
2. Identify a Loop block
3. Call getAnalysis<LoopInfo> again
4. Call getTripCount on the Loop block

If step 3 is omitted, the crash does not occur.

The attached test case reproduces the problem. It is a drop-in replacement for
the Hello example, so you should be able to overwrite your own Hello and run
the pass as you normally would. Of course, the bitcode that you analyze must
contain a loop, something as simple as:

void foo() {
    for (int i = 0; i < 10; i++);
}

Note that the test case is a ModulePass because I could not reproduce the
problem as a FunctionPass.

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