Hi,all Recently,I write some code to implement the following funtions: I make use the codes of "llvm-dis" to disassemble the bitcode file and do some change on it,after that ,"my llvm-as" assembles the changed file to generate a bitcode file. But I got a "corrupted double-linked list" error when "my llvm-as" works,however,when I do nothing on the disassembled bitcode file,everything is OK, After debugged,I found the error line is "MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrorStr);" in the "Module *llvm::ParseAssemblyFile(const std::string &Filename, SMDiagnostic &Err,LLVMContext &Context)" function, I don't know the reason,anyone once got the similar trouble? Thanks
Rajika Kumarasiri
2009-Jul-20 15:38 UTC
[LLVMdev] Got a "corrupted double-linked list" error?
This can be due to invalid memory free. Try using valgrind and check for possible memory corruption. -Rajika On Mon, Jul 20, 2009 at 6:46 PM, zhunan <zhunansjtu at gmail.com> wrote:> Hi,all > > Recently,I write some code to implement the following funtions: > > I make use the codes of "llvm-dis" to disassemble the bitcode file and > do some change on it,after that ,"my llvm-as" assembles the changed file > to generate a bitcode file. > > But I got a "corrupted double-linked list" error when "my llvm-as" > works,however,when I do nothing on the disassembled bitcode > file,everything is OK, > > After debugged,I found the error line is > > "MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), > &ErrorStr);" > > in the "Module *llvm::ParseAssemblyFile(const std::string &Filename, > SMDiagnostic &Err,LLVMContext &Context)" function, > > I don't know the reason,anyone once got the similar trouble? > > Thanks > > > > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- http://wso2.org http://llvm.org http://www.minix3.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090720/d82fa755/attachment.html>
Apparently Analagous Threads
- [LLVMdev] PareAssemblyFile returning "expected top-level entity" error message
- [LLVMdev] build failure in llvm revision69440
- [RFC] [tools] Changing Behavior of LLVM binutils When No File Is Specified
- [LLVMdev] Replace gcc with llvm-gcc
- [LLVMdev] Replace gcc with llvm-gcc