This can be due to invalid memory free.  Try using valgrind and check for possible memory corruption. <br><br>-Rajika<br><br><div class="gmail_quote">On Mon, Jul 20, 2009 at 6:46 PM, zhunan <span dir="ltr"><<a href="mailto:zhunansjtu@gmail.com">zhunansjtu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,all<br>
<br>
Recently,I write some code to implement the following funtions:<br>
<br>
I make use the codes of "llvm-dis" to disassemble the bitcode file and<br>
do some change on it,after that ,"my llvm-as" assembles the changed file<br>
to generate a bitcode file.<br>
<br>
But I got a "corrupted double-linked list" error when "my llvm-as"<br>
works,however,when I do nothing on the disassembled bitcode<br>
file,everything is OK,<br>
<br>
After debugged,I found the error line is<br>
<br>
"MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(),<br>
&ErrorStr);"<br>
<br>
in the "Module *llvm::ParseAssemblyFile(const std::string &Filename,<br>
SMDiagnostic &Err,LLVMContext &Context)" function,<br>
<br>
I don't know the reason,anyone once got the similar trouble?<br>
<br>
Thanks<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><a href="http://wso2.org">http://wso2.org</a><br><a href="http://llvm.org">http://llvm.org</a><br><a href="http://www.minix3.org">http://www.minix3.org</a><br>