This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: linux libio status
- To: egcs at cygnus dot com
- Subject: Re: linux libio status
- From: Greg Galloway <gregg at eoeml dot gtri dot gatech dot edu>
- Date: Wed, 15 Oct 1997 14:15:36 -0400
I previously wrote:
> By the way strstream seems to be broken if you let it dynamically allocate
> it's own buffer. The following program gives a segmentation fault:
>
> #include <cstdlib>
> #include <string>
> #include <strstream.h>
> main()
> {
> ostrstream os;
> os << "testing " << 123 << ends;
> string s = os.str();
> exit(0);
> }
>
My previous problems with strstream and dynamically allocated buffers appears
to be gone.
Upon looking at the call trace in gdb this program goes into an infinite
recursion on the basic_string<> ctor until __builtin_new() finally dies
giving a segmentation fault.
Greg
----
Gregory L. Galloway
Research Scientist I
http://eoeml.gtri.gatech.edu/home/gregg/