[LLVMbugs] [Bug 2552] New: FunctionPassManager crashed with function inling pass

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Jul 16 15:29:35 PDT 2008


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

           Summary: FunctionPassManager crashed with function inling pass
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Interprocedural Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nunoplopes at sapo.pt
                CC: llvmbugs at cs.uiuc.edu


The following code makes llvm crash:

std::string err;
MemoryBuffer* buf = MemoryBuffer::getFile(filename, &err)
Module* module = ParseBitcodeFile(buf, &err)
ModuleProvider* provider = new ExistingModuleProvider(module);
ExecutionEngine* engine = ExecutionEngine::create(provider);

FunctionPassManager* pass_manager = new FunctionPassManager(provider);
pass_manager->add(new TargetData(*engine->getTargetData()));
pass_manager->add(createFunctionInliningPass());


gdb stack trace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7505910 (LWP 6122)]
0xb72153fd in llvm::PMStack::top (this=0x9c600c8) at
/cvs/llvm/include/llvm/PassManagers.h:133
133       inline PMDataManager *top() { return S.back(); }
Current language:  auto; currently c++
(gdb) bt
#0  0xb72153fd in llvm::PMStack::top (this=0x9c600c8) at
/cvs/llvm/include/llvm/PassManagers.h:133
#1  0xb72d696f in llvm::ModulePass::assignPassManager (this=0x9b815c8,
PMS=@0x9c600c8, PreferredType=llvm::PMT_Unknown) at PassManager.cpp:1519
#2  0xb72e0ad8 in llvm::FunctionPassManagerImpl::addTopLevelPass
(this=0x9c60058, P=0x9b815c8) at PassManager.cpp:172
#3  0xb72d5332 in llvm::PMTopLevelManager::schedulePass (this=0x9c600c4,
P=0x9b815c8) at PassManager.cpp:462
#4  0xb72d52da in llvm::PMTopLevelManager::schedulePass (this=0x9c600c4,
P=0x95cc7b8) at PassManager.cpp:455
#5  0xb72e0b17 in llvm::FunctionPassManagerImpl::add (this=0x9c60058,
P=0x95cc7b8) at PassManager.cpp:140
#6  0xb72d54f9 in llvm::FunctionPassManager::add (this=0x89d39e0, P=0x95cc7b8)
at PassManager.cpp:1128
# 7 ...
(gdb) p S.back()
$1 = (class llvm::PMDataManager *&) @0x1fb: <error reading variable>


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