This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
libstdc++/9828: Regression: Segmentation fault in num_put::put
- From: peturr02 at ru dot is
- To: gcc-gnats at gcc dot gnu dot org
- Date: 24 Feb 2003 09:25:53 -0000
- Subject: libstdc++/9828: Regression: Segmentation fault in num_put::put
- Reply-to: peturr02 at ru dot is
>Number: 9828
>Category: libstdc++
>Synopsis: Regression: Segmentation fault in num_put::put
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 24 09:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: peturr02 at ru dot is
>Release: gcc version 3.4 20030222 (experimental)
>Organization:
>Environment:
Red Hat Linux 8.0.
>Description:
num_put<CharT>::put causes a segmentation fault if the ios_base argument is not an object of type basic_ios<CharT, Traits> (for example if CharT is wchar_t and cout is used for the ios_base argument). This works OK in gcc-3.2.1.
>How-To-Repeat:
See attachment.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="mixmodebug.cc"
Content-Disposition: inline; filename="mixmodebug.cc"
#include <sstream>
#include <iostream>
#include <locale>
int main()
{
using namespace std;
typedef num_put<wchar_t> npw_t;
wostringstream stream;
const npw_t& npw = use_facet<npw_t>(stream.getloc());
npw.put(stream, cout, L' ', static_cast<long>(10));
return 0;
}