public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/1072: Exception-unsafe code in locale
@ 2002-04-09 14:06 bkoz
  0 siblings, 0 replies; 2+ messages in thread
From: bkoz @ 2002-04-09 14:06 UTC (permalink / raw)
  To: bkoz, gcc-bugs, gcc-prs, nobody, peturr

Synopsis: Exception-unsafe code in locale

Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Tue Apr  9 14:06:08 2002
Responsible-Changed-Why:
    Mine.
State-Changed-From-To: open->closed
State-Changed-By: bkoz
State-Changed-When: Tue Apr  9 14:06:08 2002
State-Changed-Why:
    Fixed with....
    
    2002-04-09  Benjamin Kosnik  <bkoz@redhat.com>
    
    	libstdc++/1072
    	* include/bits/localefwd.h (locale::_Impl::_M_facets): Change from
    	pointer to vector.
    	Remove forward declaration of vector.
    	Include vector.
    	* include/bits/locale_facets.tcc: Remove vector include.
    	(use_locale): Adjust.
    	(has_locale): Adjust.
    	* src/locale.cc: Adjust.
    	* src/localename.cc: Same.
    	
    
    Also, I audited the rest of the library code for this kind of stuff. I think we're ok now.
    
    thanks,
    -benjamin

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=1072


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libstdc++/1072: Exception-unsafe code in locale
@ 2001-05-27  4:26 Petter Reinholdtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Petter Reinholdtsen @ 2001-05-27  4:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Petter Reinholdtsen <pere@hungry.com>
To: peturr@usa.net
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/1072: Exception-unsafe code in locale
Date: Sun, 27 May 2001 13:19:26 +0200

 Here are a few comments from a simple gcc user.
 
 I checked the current source in CVS and compared it to the code in
 your bug report, and the code is different now.
 
 > These catch blocks are useless since the target pointers are never
 > modified if either operator new or the constructors throw an
 > exception.
 
 I believe this is correct.  The try/catch block is completely useless,
 and it would be better to use auto_ptr.
 
 > In fact, they will probably cause a crash since the pointers are not
 > initialized before the try block.
 
 This seem to be correct with gcc 2.95.2, but the C++ standard
 specifies the pointer member variables should be initialized to
 0. (Read clause 12.6.2, 8.5 and 3.9 to learn more).
 
 > Also, if an exception is thrown from the second try block, the
 > object allocated in the first one is leaked.
 
 This is correct, but seem to have been fixed.
 -- 
 ##>  Petter Reinholdtsen  <##  |  pere@hungry.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-09 21:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-09 14:06 libstdc++/1072: Exception-unsafe code in locale bkoz
  -- strict thread matches above, loose matches on Subject: below --
2001-05-27  4:26 Petter Reinholdtsen

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).