This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Suspicious C++ stringstream crashes, gcc 3.3.3


On Mon, May 24, 2004 at 03:18:54PM +0100, Andrew Walrond wrote:
> Are there any known stringstream problems in 3.3.3? I have a reproducible 
> crash which seems to scribble on the stack and causes a segfault. Bugzilla 
> searches haven't thrown up anything useful.
> 
> Usual story; If I put in debug code, it goes away, so I haven't been able to 
> isolate a small test case. But I am now pretty convinced that the problem 
> lies here.

This sounds like memory corruption.  If you scribble on the heap, a crash
can result at any later point that accesses the heap, including in
stringstream.  The fact that adding debug code makes it go away rings this
bell for me.

I would recommend the use of some memory-checking tool, for example,
valgrind if you're on an x86 gnu/linux box.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]