public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: llib@computer.org To: gcc-gnats@gcc.gnu.org Subject: libstdc++/7942: ostream core dump with hex/internal/showbase formatted output Date: Mon, 16 Sep 2002 20:46:00 -0000 [thread overview] Message-ID: <200209170345.NAA20825@bullet.anu.edu.au> (raw) >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 <iostream> #include <iomanip> 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:
next reply other threads:[~2002-09-17 3:46 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-09-16 20:46 llib [this message] 2002-11-01 9:36 paolo 2002-11-05 19:33 bkoz 2002-11-10 21:56 Bill Clarke
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=200209170345.NAA20825@bullet.anu.edu.au \ --to=llib@computer.org \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).