From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23630 invoked by alias); 17 Sep 2002 03:46:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 23596 invoked by uid 71); 17 Sep 2002 03:46:01 -0000 Resent-Date: 17 Sep 2002 03:46:01 -0000 Resent-Message-ID: <20020917034601.23594.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, llib@computer.org Received: (qmail 23470 invoked from network); 17 Sep 2002 03:45:58 -0000 Received: from unknown (HELO bullet.anu.edu.au) (150.203.163.6) by sources.redhat.com with SMTP; 17 Sep 2002 03:45:58 -0000 Received: (from wpc@localhost) by bullet.anu.edu.au (8.9.3/8.9.3) id NAA20825; Tue, 17 Sep 2002 13:45:56 +1000 (EST) Message-Id: <200209170345.NAA20825@bullet.anu.edu.au> Date: Mon, 16 Sep 2002 20:46:00 -0000 From: llib@computer.org To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: 3.113 Subject: libstdc++/7942: ostream core dump with hex/internal/showbase formatted output X-SW-Source: 2002-09/txt/msg00483.txt.bz2 List-Id: >Number: 7942 >Category: libstdc++ >Synopsis: ostream core dump with hex/internal/showbase formatted output >Confidential: no >Severity: critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Sep 16 20:46:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Bill Clarke >Release: 3.1.1 >Organization: Australian National University >Environment: System: SunOS bullet 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-5_10 Architecture: sun4 both 32 and 64-bit targets fail host: sparc-sun-solaris2.8 build: sparc-sun-solaris2.8 target: sparc-sun-solaris2.8 configured with: ../gcc-3.1.1/configure --with-cpu=ultrasparc --enable-lanaguages=c,c++,f77 : (reconfigured) ../gcc-3.1.1/configure --with-cpu=ultrasparc --enable-languages=c,c++,f77 >Description: a program that uses a particular combination of formatted output (ostream) dumps core. >How-To-Repeat: // iosbug.cc: #include #include int main() { using namespace std; cout.flags(ios_base::showbase); cout << internal; cout << hex; cout << setw(2); // must be >1 for bug! (5 also dumps) // cout << 0; // can print out a number (doesn't change bug) cout << endl; // must be endl for bug, !flush! cout << 1; // must be non-zero for bug! cout << endl; // must be endl for bug, !flush! cout << setw(2); // must be >1 for bug! (5 also dumps) cout << 0; // dumps core in std::__put cout << endl; return 0; } // end of iosbug.cc $ g++ -Wall -m32 -g iosbug.cc -o iosbug $ ./iosbug 0x1 Segmentation fault (core dumped) Exit 139 $ according to dbx: $ dbx iosbug core Reading iosbug core file header read successfully Reading ld.so.1 Reading libstdc++.so.4 Reading libm.so.1 Reading libgcc_s.so.1 Reading libc.so.1 Reading libdl.so.1 Reading libc_psr.so.1 program terminated by signal SEGV (no mapping at the fault address) 0xff3206cc: __align_cpy_1+0x00dc: ldd [%g1], %f0 dbx: warning: invalid frame pointer (/usr/local/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where =>[1] __align_cpy_1(0xffbeff80, 0xffbeffff, 0xfffff21a, 0x7, 0xfffff210, 0xffbef19b), at 0xff3206cc [2] _ZSt5__padIcSt11char_traitsIcEEvRSt8ios_baseT_PS4_PKS4_iib(0x2b, 0xffbef21a, 0xffbef19a, 0xffbef218, 0x2, 0x1), at 0xff2c98a8 [3] _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertES3_RSt8ios_basecPKci(0xff3091a8, 0xffbef220, 0x21628, 0x20, 0xffbef198, 0x2), at 0xff2c3cac (/usr/local/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) exit $ 64-bit build of iosbug does similar. (if you really want preprocessor output for the above source, then email me!) >Fix: workaround: none known. i'm guessing it's a bug somewhere in std::__pad; when installed: ${prefix}/include/c++/3.1.1/bits/locale_facets.tcc, in source: gcc/libstdc++-v3/include/bits/locale_facets.tcc. i note from cvsweb that __pad has changed recently (1.77->1.78) but i don't know if that will affect the bug. >Release-Note: >Audit-Trail: >Unformatted: