linux libio status
Greg Galloway
gregg@eoeml.gtri.gatech.edu
Wed Oct 15 12:10:00 GMT 1997
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/
More information about the Gcc
mailing list