[LLVMdev] An error when insert a function call in the IR

Eric Lu eirc.lew at gmail.com
Sun Sep 22 04:43:09 PDT 2013


I insert an function call in the IR, and causes the following error. and
the error seems to happen on some cases. The attached file nest.c can be
 processes successfully and the nest-ddp.ll is the output file, but the
nr__routines.c will fail.

llvm-3.2-svn/lib/VMCore/DebugLoc.cpp:60: void
llvm::DebugLoc::getScopeAndInlinedAt(llvm::MDNode*&, llvm::MDNode*&, const
llvm::LLVMContext&) const: Assertion `unsigned(ScopeIdx) <=
Ctx.pImpl->ScopeRecords.size() && "Invalid ScopeIdx!"' failed.

0  opt                        0x0000000000cde472
1  opt                        0x0000000000cde147
2  libpthread.so.0            0x0000003faf60f500
3  libc.so.6                  0x0000003faee328a5 gsignal + 53
4  libc.so.6                  0x0000003faee34085 abort + 373
5  libc.so.6                  0x0000003faee2ba1e
6  libc.so.6                  0x0000003faee2bae0 __assert_perror_fail + 0
7  opt                        0x0000000000b98f63
llvm::DebugLoc::getScopeAndInlinedAt(llvm::MDNode*&, llvm::MDNode*&,
llvm::LLVMContext const&) const + 147
8  opt                        0x0000000000b99166
llvm::DebugLoc::getAsMDNode(llvm::LLVMContext const&) const + 70
9  opt                        0x0000000000c373ec
llvm::Instruction::getMetadataImpl(unsigned int) const + 52
10 opt                        0x0000000000c36f93
llvm::Instruction::getMetadataImpl(llvm::StringRef) const + 73
11 libLDDProfileInstrument.so 0x00007f4fe146a14d
12 libLDDProfileInstrument.so 0x00007f4fe14661aa
13 libLDDProfileInstrument.so 0x00007f4fe1465231
14 libLDDProfileInstrument.so 0x00007f4fe14660bc
15 opt                        0x0000000000c441d0
llvm::MPPassManager::runOnModule(llvm::Module&) + 456
16 opt                        0x0000000000c446f5
llvm::PassManagerImpl::run(llvm::Module&) + 125
17 opt                        0x0000000000c448ad
llvm::PassManager::run(llvm::Module&) + 39
18 opt                        0x00000000006acebb main + 5540
19 libc.so.6                  0x0000003faee1ecdd __libc_start_main + 253
20 opt                        0x000000000069cce9
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130922/3519c460/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nest-ddp.ll
Type: application/octet-stream
Size: 20078 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130922/3519c460/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nest.c
Type: text/x-csrc
Size: 374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130922/3519c460/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nr_routines.c
Type: text/x-csrc
Size: 4524 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130922/3519c460/attachment-0001.c>


More information about the llvm-dev mailing list