libstdc++/6012: Crash in iostreams

amirgeva@hotmail.com amirgeva@hotmail.com
Wed Mar 20 05:36:00 GMT 2002


>Number:         6012
>Category:       libstdc++
>Synopsis:       Crash in iostreams
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 20 04:26:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Amir Geva
>Release:        3.0.4
>Organization:
>Environment:
powerpc-ibm-aix4.3.3.0
>Description:
I am encountering strange crashes in the libstdc++ code.
The included program crashes in the first << operator giving a "Illegal instruction (core dumped)"
The callstack shows that it crashed in: bits/locale_facets.h
At line 778, which is one of the num_put::put() functions.
It seems to be having an invalid virtual base pointer or something to do with the virtual table.

This is a simple example created after a larger program encountered this problem, even with other stream types.
>How-To-Repeat:
#include <iostream>
#include <sstream>

int main(int argc, char* argv[])
{
  std::basic_ostringstream<char> os;
  os << 5.3;
  std::cout << os.str() << std::endl;
  return 0;
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list