Rafael Espíndola
2006-Nov-30 11:20 UTC
[LLVMdev] [patch] [llvm-gcc4] fix bootstrap failure
The attached patch fixes a bootstrap failure introduced by the use of llvm_streams. Best Regards, Rafael -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm-gcc.patch Type: text/x-patch Size: 1217 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20061130/d4b11c90/attachment.bin>
The llvm_ostreams, which you take the address of go out of scope very quickly, and are only stored by address in the bytecode writer, thus the writers have a pointer to a stack allocated object they are to write to. This crashes. Andrew On 11/30/06, Rafael Espíndola <rafael.espindola at gmail.com> wrote:> The attached patch fixes a bootstrap failure introduced by the use of > llvm_streams. > > Best Regards, > Rafael > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > >
Rafael Espíndola
2006-Nov-30 19:07 UTC
[LLVMdev] [patch] [llvm-gcc4] fix bootstrap failure
On 11/30/06, Andrew Lenharth <andrewl at lenharth.org> wrote:> The llvm_ostreams, which you take the address of go out of scope very > quickly, and are only stored by address in the bytecode writer, thus > the writers have a pointer to a stack allocated object they are to > write to. This crashes.The attached version leaks :-) It is a work around. If I understand correctly, the ostream wrapper is also a temporary solution, so this might be acceptable.> AndrewThanks, Rafael -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm-gcc.patch Type: text/x-patch Size: 1255 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20061130/aa0d2158/attachment.bin>
This patch crashes the built compiler. On Nov 30, 2006, at 7:20 AM, Rafael Espíndola wrote:> The attached patch fixes a bootstrap failure introduced by the use of > llvm_streams. > > Best Regards, > Rafael > <llvm-gcc.patch> > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2417 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20061130/76be330a/attachment.bin>
Reasonably Related Threads
- [LLVMdev] [patch] [llvm-gcc4] fix bootstrap failure
- [LLVMdev] [patch] [llvm-gcc4] fix bootstrap failure
- [LLVMdev] [patch] [llvm-gcc4] fix bootstrap failure
- [LLVMdev] [patch] [llvm-gcc4] fix bootstrap failure
- [LLVMdev] Re: Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM