public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Bill Clarke <llib@computer.org>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: libstdc++/7942: ostream core dump with hex/internal/showbase formatted output
Date: Sun, 10 Nov 2002 21:56:00 -0000	[thread overview]
Message-ID: <20021111055601.30310.qmail@sources.redhat.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5067 bytes --]

The following reply was made to PR libstdc++/7942; it has been noted by GNATS.

From: Bill Clarke <llib@computer.org>
To: bkoz@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
        nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org, paolo@gcc.gnu.org
Cc:  
Subject: Re: libstdc++/7942: ostream core dump with hex/internal/showbase
	formatted output
Date: 11 Nov 2002 16:47:36 +1100

 On Wed, 2002-11-06 at 14:33, bkoz@gcc.gnu.org wrote:
 >     Can you try this with gcc or gcc-3_2-branch on solaris? I can't reproduce this on linux either. 
 
 i can confirm this on a recent checkout of gcc-3_2-branch (20021110) on
 solaris 2.9, configured with --with-cpu=ultrasparc (also has the same
 effect with same branch but configured without the cpu flag).  gdb stack
 trace is included in the output shown below (gdb 4.17, yes that's old
 but a build of gdb 5.2.1 dumps core when doing the stack trace; *sigh*
 another bug report to do )-:  
 
 note: i've changed the test code: changed line 16 from "cout << 1" to
 "cout << 9"; this makes it clearer that the program is reusing buffers
 (since the string "0x 9" appears in the stack trace, despite the core
 dump occuring during execution of the following "cout << 0").
 
 also note: the stack trace gets lost after level 6.
 
 $ ~/incoming/gcc-cvs/install/bin/g++ -static -g -o iosbug iosbug.cc
 [static so when i run it i'm sure to get the right library]
 
 Current directory is /space/bill/work/tests/
 GNU gdb 4.17
 Copyright 1998 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you
 are
 welcome to change it and/or distribute copies of it under certain
 conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for
 details.
 This GDB was configured as "sparc-sun-solaris2.6"...
 (gdb) run
 Starting program: /space/bill/work/tests/iosbug 
 
 0x9
 
 Program received signal SIGSEGV, Segmentation fault.
 0x43da4 in memcpy ()
     at
 /space/bill/incoming/gcc-cvs/gcc-obj/sparc-sun-solaris2.9/libstdc++-v3/include/sparc-sun-solaris2.9/bits/atomicity.h:89
 (gdb) bt
 #0  0x43da4 in memcpy ()
     at
 /space/bill/incoming/gcc-cvs/gcc-obj/sparc-sun-solaris2.9/libstdc++-v3/include/sparc-sun-solaris2.9/bits/atomicity.h:89
 #1  0x5db74 in
 _ZNSt5__padIcSt11char_traitsIcEE6_S_padERSt8ios_basecPcPKciib (
     __io=@0x1, __fill=58 ':', __news=0xffbff2ba " 9", 
     __olds=0xffbff338 "\210ÿ¿óPÿ¿õ`", __newlen=2, __oldlen=<incomplete
 type>, 
     __num=<incomplete type>)
     at
 /space/bill/incoming/gcc-cvs/gcc-obj/sparc-sun-solaris2.9/libstdc++-v3/include/bits/char_traits.h:147
 #2  0x584f4 in
 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertES3_RSt8ios_basecPKci (this=<incomplete type>, 
     __s={<iterator<std::output_iterator_tag,void,void,void,void>> = {}, 
       _M_sbuf = 0x60000000, _M_failed = false}, __io=@0x989e0, __fill=32
 ' ', 
     __ws=0xffbff2b8 "0x 9", __len=2)
     at
 /space/bill/incoming/gcc-cvs/gcc-obj/sparc-sun-solaris2.9/libstdc++-v3/include/bits/locale_facets.tcc:843
 #3  0x5838c in
 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE12_M_widen_intES3_RSt8ios_basecPci (this=<incomplete type>, 
     __s={<iterator<std::output_iterator_tag,void,void,void,void>> = {}, 
       _M_sbuf = 0xa000978, _M_failed = 84}, __io=@0x989e0, __fill=32 '
 ', 
     __cs=0xffbff330 "", __len=1)
     at
 /space/bill/incoming/gcc-cvs/gcc-obj/sparc-sun-solaris2.9/libstdc++-v3/include/bits/locale_facets.tcc:825
 #4  0x58cec in
 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE14_M_convert_intImEES3_S3_RSt8ios_basecccT_ (this=<incomplete type>, 
     __s={<iterator<std::output_iterator_tag,void,void,void,void>> = {}, 
       _M_sbuf = 0x987, _M_failed = 8}, __io=@0x989e0, __fill=32 ' ', 
     __mod=117 'u', __modl=0 '\000', __v=1140853129)
     at
 /space/bill/incoming/gcc-cvs/gcc-obj/sparc-sun-solaris2.9/libstdc++-v3/include/bits/locale_facets.tcc:716
 #5  0x58968 in
 _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE6do_putES3_RSt8ios_basecm (this=<incomplete type>, 
     __s={<iterator<std::output_iterator_tag,void,void,void,void>> = {}, 
       _M_sbuf = 0xffbff5, _M_failed = 248}, __io=@0x989e0, __fill=32 '
 ', __v=0)
     at
 /space/bill/incoming/gcc-cvs/gcc-obj/sparc-sun-solaris2.9/libstdc++-v3/include/bits/locale_facets.tcc:895
 #6  0x60fd8 in _ZNSolsEm (this=<incomplete type>, __n=0)
     at
 /space/bill/incoming/gcc-cvs/gcc-obj/sparc-sun-solaris2.9/libstdc++-v3/include/bits/locale_facets.h:745
 Cannot access memory at address 0x5cffc02e.
 (gdb) 
 
 cheers,
 /lib
 -- 
 /lib: Bill Clarke  ResearchScientist CAPResearch DeptCompSci ANU .au
 http://llib.cjb.net llib@computer.org  tel:+61-2-6125x5687 fax:x0010
 PGPid:B381EE7DB7D3E58F17248C672E2DA124ADADF444 GNU unix LaTeX XPilot
 Buffy DrWho Goodies StarTrek XFiles Origami SML SMP MPI mozilla tcsh
 Asimov Bear Clarke Donaldson Volleyball Ultimate Cricket emacs C++ X
 Jordan Kay Lackey Martin Stasheff DeepPurple H&C KLF Queen PinkFloyd
 


             reply	other threads:[~2002-11-11  5:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-10 21:56 Bill Clarke [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-11-05 19:33 bkoz
2002-11-01  9:36 paolo
2002-09-16 20:46 llib

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=20021111055601.30310.qmail@sources.redhat.com \
    --to=llib@computer.org \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@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: link
Be 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).