I'm getting seemingly odd SegFaults when writing out using a raw_fd_ostream in the current trunk (last version worked, believe it was 153818, or similar). Again, nothing in the release notes... should I be scanning the svn log? For example, I have something like: raw_fd_ostream fout("out.txt", errorStr=""); .... fout<<"Hello World, how are you!"\n"; and it'll write out to the file, "Hello Wor" and then seg fault without assert. Sadly, this only happens for certain C code, any idea why this might be occuring? Also, during build I get a lot of these warnings:llvm/ADT/DenseMap.h: In copy constructor ‘llvm::DenseMap<KeyT, ValueT, KeyInfoT>::DenseMap(const llvm::DenseMap<KeyT, ValueT, KeyInfoT>&) [with KeyT = unsigned int, ValueT = llvm::PointerAlignElem, KeyInfoT = llvm::DenseMapInfo<unsigned int>]’: I'm guessing I messed up when updating somehow? I just used gmake update. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121026/32888213/attachment.html>
It looks like some kind of file IO buffer overflow. I'm not dumping any long strings at one time, but I am keeping the file open for the entire run. I've yet to find a correlation to other C files. On Fri, Oct 26, 2012 at 3:17 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:> I'm getting seemingly odd SegFaults when writing out using a > raw_fd_ostream in the current trunk (last version worked, believe it was > 153818, or similar). Again, nothing in the release notes... should I be > scanning the svn log? > > For example, I have something like: > > raw_fd_ostream fout("out.txt", errorStr=""); > .... > fout<<"Hello World, how are you!"\n"; > > and it'll write out to the file, "Hello Wor" and then seg fault without > assert. > > Sadly, this only happens for certain C code, any idea why this might be > occuring? > > Also, during build I get a lot of these warnings:llvm/ADT/DenseMap.h: In > copy constructor ‘llvm::DenseMap<KeyT, ValueT, KeyInfoT>::DenseMap(const > llvm::DenseMap<KeyT, ValueT, KeyInfoT>&) [with KeyT = unsigned int, ValueT > = llvm::PointerAlignElem, KeyInfoT = llvm::DenseMapInfo<unsigned int>]’: > > I'm guessing I messed up when updating somehow? I just used gmake update. > > Thanks. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121026/25b28494/attachment.html>
So I did a clean checkout and build and still have this issue, did something changed with the way/when it's getting flushed? My old revision did not have this issue, this is an issue strictly with LLVM it seems. On Fri, Oct 26, 2012 at 3:27 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:> It looks like some kind of file IO buffer overflow. I'm not dumping any > long strings at one time, but I am keeping the file open for the entire > run. I've yet to find a correlation to other C files. > > > On Fri, Oct 26, 2012 at 3:17 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > >> I'm getting seemingly odd SegFaults when writing out using a >> raw_fd_ostream in the current trunk (last version worked, believe it was >> 153818, or similar). Again, nothing in the release notes... should I be >> scanning the svn log? >> >> For example, I have something like: >> >> raw_fd_ostream fout("out.txt", errorStr=""); >> .... >> fout<<"Hello World, how are you!"\n"; >> >> and it'll write out to the file, "Hello Wor" and then seg fault without >> assert. >> >> Sadly, this only happens for certain C code, any idea why this might be >> occuring? >> >> Also, during build I get a lot of these warnings:llvm/ADT/DenseMap.h: In >> copy constructor ‘llvm::DenseMap<KeyT, ValueT, KeyInfoT>::DenseMap(const >> llvm::DenseMap<KeyT, ValueT, KeyInfoT>&) [with KeyT = unsigned int, ValueT >> = llvm::PointerAlignElem, KeyInfoT = llvm::DenseMapInfo<unsigned int>]’: >> >> I'm guessing I messed up when updating somehow? I just used gmake update. >> >> Thanks. >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121029/0d333d41/attachment.html>
Reasonably Related Threads
- [LLVMdev] changes to raw_fd_ostream
- [LLVMdev] changes to raw_fd_ostream
- [LLVMdev] compile error when using overloaded = operator of DenseMap
- [LLVMdev] compile error when using overloaded = operator of DenseMap
- [LLVMdev] [NVPTX] Strange assertion around BlockToChain.clear(); in Release+Asserts build