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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to