public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Add missing __throw_exception_again
@ 2012-03-09 17:44 Andreas Schwab
  2012-03-09 18:17 ` Paolo Carlini
  2012-03-09 19:01 ` Andreas Schwab
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Schwab @ 2012-03-09 17:44 UTC (permalink / raw)
  To: libstdc++; +Cc: gcc-patches

This prevents the 22_locale/locale/cons/12352.cc test from crashing.
Tested on m68k-linux.

Andreas.

2012-03-09  Andreas Schwab  <schwab@linux-m68k.org>

	* config/locale/gnu/monetary_members.cc
	(moneypunct<char,true>::_M_initialize_moneypunct): Throw caught
	exception again.
	(moneypunct<char,false>::_M_initialize_moneypunct): Likewise.
---
 libstdc++-v3/config/locale/gnu/monetary_members.cc |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/config/locale/gnu/monetary_members.cc b/libstdc++-v3/config/locale/gnu/monetary_members.cc
index 214c4af..d1d9939 100644
--- a/libstdc++-v3/config/locale/gnu/monetary_members.cc
+++ b/libstdc++-v3/config/locale/gnu/monetary_members.cc
@@ -1,6 +1,6 @@
 // std::moneypunct implementation details, GNU version -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -339,6 +339,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	      delete [] __group;
 	      delete [] __ps;
 	      delete [] __ns;
+	      __throw_exception_again;
 	    }
 
 	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
@@ -489,6 +490,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	      delete [] __group;
 	      delete [] __ps;
 	      delete [] __ns;
+	      __throw_exception_again;
 	    }
 
 	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-- 
1.7.9.3


-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: [PATCH] Add missing __throw_exception_again
  2012-03-09 17:44 [PATCH] Add missing __throw_exception_again Andreas Schwab
@ 2012-03-09 18:17 ` Paolo Carlini
  2012-03-09 18:57   ` Jakub Jelinek
  2012-03-09 19:01 ` Andreas Schwab
  1 sibling, 1 reply; 5+ messages in thread
From: Paolo Carlini @ 2012-03-09 18:17 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libstdc++, gcc-patches, Jakub Jelinek

HI,
> This prevents the 22_locale/locale/cons/12352.cc test from crashing.
> Tested on m68k-linux.
Depending on the system, doesn't crash that easily, but indeed the issue 
is real and the patch is right, we want it in 4.7.1 (if not 4.7.0?) and 
mainline.

Thanks,
Paolo.

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

* Re: [PATCH] Add missing __throw_exception_again
  2012-03-09 18:17 ` Paolo Carlini
@ 2012-03-09 18:57   ` Jakub Jelinek
  0 siblings, 0 replies; 5+ messages in thread
From: Jakub Jelinek @ 2012-03-09 18:57 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: Andreas Schwab, libstdc++, gcc-patches

On Fri, Mar 09, 2012 at 07:14:52PM +0100, Paolo Carlini wrote:
> >This prevents the 22_locale/locale/cons/12352.cc test from crashing.
> >Tested on m68k-linux.
> Depending on the system, doesn't crash that easily, but indeed the
> issue is real and the patch is right, we want it in 4.7.1 (if not
> 4.7.0?) and mainline.

Ok for 4.7.0.

	Jakub

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

* Re: [PATCH] Add missing __throw_exception_again
  2012-03-09 17:44 [PATCH] Add missing __throw_exception_again Andreas Schwab
  2012-03-09 18:17 ` Paolo Carlini
@ 2012-03-09 19:01 ` Andreas Schwab
  2012-03-09 19:12   ` Paolo Carlini
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2012-03-09 19:01 UTC (permalink / raw)
  To: libstdc++; +Cc: gcc-patches

This makes the 22_locale/locale/cons/12352.cc test fail everywhere.

Andreas.

2012-03-09  Andreas Schwab  <schwab@linux-m68k.org>

	* config/locale/gnu/monetary_members.cc
	(moneypunct<char,true>::_M_initialize_moneypunct): Throw caught
	exception again.
	(moneypunct<char,false>::_M_initialize_moneypunct): Likewise.

testsuite/
	* testsuite/22_locale/locale/cons/12352.cc: Also test en_US
	locale.
---
 libstdc++-v3/config/locale/gnu/monetary_members.cc |    4 +++-
 .../testsuite/22_locale/locale/cons/12352.cc       |    4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/config/locale/gnu/monetary_members.cc b/libstdc++-v3/config/locale/gnu/monetary_members.cc
index 214c4af..d1d9939 100644
--- a/libstdc++-v3/config/locale/gnu/monetary_members.cc
+++ b/libstdc++-v3/config/locale/gnu/monetary_members.cc
@@ -1,6 +1,6 @@
 // std::moneypunct implementation details, GNU version -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -339,6 +339,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	      delete [] __group;
 	      delete [] __ps;
 	      delete [] __ns;
+	      __throw_exception_again;
 	    }
 
 	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
@@ -489,6 +490,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	      delete [] __group;
 	      delete [] __ps;
 	      delete [] __ns;
+	      __throw_exception_again;
 	    }
 
 	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/12352.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/12352.cc
index f56bf67..0449bf3 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/12352.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/12352.cc
@@ -1,4 +1,5 @@
 // { dg-require-namedlocale "" }
+// { dg-require-namedlocale "en_US" }
 
 // Copyright (C) 2003, 2005, 2009 Free Software Foundation
 //
@@ -105,6 +106,9 @@ void test01(int iters)
 	      std::locale loc1 = std::locale("");
 	      std::locale loc2(loc1, std::locale::classic(),
 			       std::locale::numeric);
+	      std::locale loc3 = std::locale("en_US");
+	      std::locale loc4(loc3, std::locale::classic(),
+			       std::locale::numeric);
 	    }
 	  catch (std::exception&)
 	    {
-- 
1.7.9.3


-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: [PATCH] Add missing __throw_exception_again
  2012-03-09 19:01 ` Andreas Schwab
@ 2012-03-09 19:12   ` Paolo Carlini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Carlini @ 2012-03-09 19:12 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libstdc++, gcc-patches

On 03/09/2012 08:01 PM, Andreas Schwab wrote:
> This makes the 22_locale/locale/cons/12352.cc test fail everywhere.
Excellent. Thus Ok mainline and 4_7-branch with the testcase extension too.

Thanks again,
Paolo.

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

end of thread, other threads:[~2012-03-09 19:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-09 17:44 [PATCH] Add missing __throw_exception_again Andreas Schwab
2012-03-09 18:17 ` Paolo Carlini
2012-03-09 18:57   ` Jakub Jelinek
2012-03-09 19:01 ` Andreas Schwab
2012-03-09 19:12   ` Paolo Carlini

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