Hi,all I tried to run the generated whole-program bitcode of BIND,but I got some information: 0 lli 0x0000000000feda16 1 lli 0x0000000000fed88f 2 libpthread.so.0 0x0000003df340eee0 3 libc.so.6 0x0000003df28332f5 gsignal + 53 4 libc.so.6 0x0000003df2834b20 abort + 384 5 libc.so.6 0x0000003df282c2fa __assert_fail + 234 6 lli 0x000000000085ece9 llvm::SmallVectorImpl<llvm::Instruction*>::operator[](unsigned int) + 77 7 lli 0x0000000000850ce0 llvm::BitcodeReader::ParseMetadataAttachment() + 448 8 lli 0x0000000000851043 llvm::BitcodeReader::ParseFunctionBody(llvm::Function*) + 677 9 lli 0x0000000000854b29 llvm::BitcodeReader::materializeFunction(llvm::Function*, std::string*) + 323 10 lli 0x0000000000c6a073 llvm::JIT::getPointerToFunction(llvm::Function*) + 421 11 lli 0x0000000000c68ae6 llvm::JIT::runFunction(llvm::Function*, std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> > const&) + 120 12 lli 0x0000000000c91b25 llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::string, std::allocator<std::string> > const&, char const* const*) + 1091 13 lli 0x00000000008448ea main + 1841 14 libc.so.6 0x0000003df281ea2d __libc_start_main + 253 15 lli 0x0000000000843fd9 Does it mean that there is something wrong with my libpthread.so???? I tried this: llvm-ld test.o -lpthread the system told me that "Cannot find the library libpthread.so" ,which is just in /usr/lib64 What's the problem?? Thanks Nan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091031/74d352ab/attachment.html>
No, that means you're running into http://llvm.org/bugs/show_bug.cgi?id=5278. Stack frames after __assert_fail usually don't mean much. pthread is probably involved because it controls how signals are sent to threads. On Fri, Oct 30, 2009 at 11:12 PM, Nan Zhu <zhunansjtu at gmail.com> wrote:> Hi,all > > I tried to run the generated whole-program bitcode of BIND,but I got some > information: > > 0 lli 0x0000000000feda16 > 1 lli 0x0000000000fed88f > 2 libpthread.so.0 0x0000003df340eee0 > 3 libc.so.6 0x0000003df28332f5 gsignal + 53 > 4 libc.so.6 0x0000003df2834b20 abort + 384 > 5 libc.so.6 0x0000003df282c2fa __assert_fail + 234 > 6 lli 0x000000000085ece9 > llvm::SmallVectorImpl<llvm::Instruction*>::operator[](unsigned int) + 77 > 7 lli 0x0000000000850ce0 > llvm::BitcodeReader::ParseMetadataAttachment() + 448 > 8 lli 0x0000000000851043 > llvm::BitcodeReader::ParseFunctionBody(llvm::Function*) + 677 > 9 lli 0x0000000000854b29 > llvm::BitcodeReader::materializeFunction(llvm::Function*, std::string*) + > 323 > 10 lli 0x0000000000c6a073 > llvm::JIT::getPointerToFunction(llvm::Function*) + 421 > 11 lli 0x0000000000c68ae6 > llvm::JIT::runFunction(llvm::Function*, std::vector<llvm::GenericValue, > std::allocator<llvm::GenericValue> > const&) + 120 > 12 lli 0x0000000000c91b25 > llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, > std::vector<std::string, std::allocator<std::string> > const&, char const* > const*) + 1091 > 13 lli 0x00000000008448ea main + 1841 > 14 libc.so.6 0x0000003df281ea2d __libc_start_main + 253 > 15 lli 0x0000000000843fd9 > > > Does it mean that there is something wrong with my libpthread.so???? > > I tried this: > > llvm-ld test.o -lpthread > > the system told me that "Cannot find the library libpthread.so" ,which is > just in /usr/lib64 > > What's the problem?? > > Thanks > > Nan > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >
Hi, On Sat, Oct 31, 2009 at 11:42 AM, Nan Zhu <zhunansjtu at gmail.com> wrote:> Hi,all > > I tried to run the generated whole-program bitcode of BIND,but I got some > information: > > 0 lli 0x0000000000feda16 > 1 lli 0x0000000000fed88f > 2 libpthread.so.0 0x0000003df340eee0 > 3 libc.so.6 0x0000003df28332f5 gsignal + 53 > 4 libc.so.6 0x0000003df2834b20 abort + 384 > 5 libc.so.6 0x0000003df282c2fa __assert_fail + 234 > 6 lli 0x000000000085ece9 > llvm::SmallVectorImpl<llvm::Instruction*>::operator[](unsigned int) + 77 > 7 lli 0x0000000000850ce0 > llvm::BitcodeReader::ParseMetadataAttachment() + 448 > 8 lli 0x0000000000851043Looks like a bug in the following piece of code, from BitcodeReader::ParseMetadataAttachment(): 1601 case bitc::METADATA_ATTACHMENT: { 1602 unsigned RecordLength = Record.size(); 1603 if (Record.empty() || (RecordLength - 1) % 2 == 1) 1604 return Error ("Invalid METADATA_ATTACHMENT reader!"); 1605 Instruction *Inst = InstructionList[Record[0]]; 1606 for (unsigned i = 1; i != RecordLength; i = i+2) { 1607 unsigned Kind = Record[i]; 1608 Value *Node = MDValueList.getValueFwdRef(Record[i+1]); 1609 TheMetadata.addMD(Kind, cast<MDNode>(Node), Inst); 1610 } 1611 break; 1612 } At line 1606, i never becomes equal to RecordLength. Regards, -Mahadevan.
Mahadevan R wrote:> Hi, > > On Sat, Oct 31, 2009 at 11:42 AM, Nan Zhu <zhunansjtu at gmail.com> wrote: >> Hi,all >> >> I tried to run the generated whole-program bitcode of BIND,but I got some >> information: >> >> 0 lli 0x0000000000feda16 >> 1 lli 0x0000000000fed88f >> 2 libpthread.so.0 0x0000003df340eee0 >> 3 libc.so.6 0x0000003df28332f5 gsignal + 53 >> 4 libc.so.6 0x0000003df2834b20 abort + 384 >> 5 libc.so.6 0x0000003df282c2fa __assert_fail + 234 >> 6 lli 0x000000000085ece9 >> llvm::SmallVectorImpl<llvm::Instruction*>::operator[](unsigned int) + 77 >> 7 lli 0x0000000000850ce0 >> llvm::BitcodeReader::ParseMetadataAttachment() + 448 >> 8 lli 0x0000000000851043 > > Looks like a bug in the following piece of code, from > BitcodeReader::ParseMetadataAttachment(): > > 1601 case bitc::METADATA_ATTACHMENT: { > 1602 unsigned RecordLength = Record.size(); > 1603 if (Record.empty() || (RecordLength - 1) % 2 == 1) > 1604 return Error ("Invalid METADATA_ATTACHMENT reader!"); > 1605 Instruction *Inst = InstructionList[Record[0]]; > 1606 for (unsigned i = 1; i != RecordLength; i = i+2) { > 1607 unsigned Kind = Record[i]; > 1608 Value *Node = MDValueList.getValueFwdRef(Record[i+1]); > 1609 TheMetadata.addMD(Kind, cast<MDNode>(Node), Inst); > 1610 } > 1611 break; > 1612 } > > At line 1606, i never becomes equal to RecordLength.I strongly suspect this is llvm.org/PR5278 . Please add your comments there, thanks! Nick
Maybe Matching Threads
- [LLVMdev] Something wrong with my libpthread.so
- [LLVMdev] Something wrong with my libpthread.so
- Question about METADATA_BLOCKs in bitcode
- [LLVMdev] [PATCH / PROPOSAL] bitcode encoding that is ~15% smaller for large bitcode files...
- [LLVMdev] [PATCH / PROPOSAL] bitcode encoding that is ~15% smaller for large bitcode files...