diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 81c271b07633c73e93fdf92b0957fe206cbd520c..24a8e9dbaf728796e88b7f883db393ea20db1a55 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,19 @@
+2003-06-12  Andrew Haley  <aph@redhat.com>
+
+	* prims.cc (catch_segv): Create exception in handler.
+	(catch_fpe): Likewise.	
+	(_Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ): Likewise.
+	(_Jv_ThrowSignal): Remove.
+
+	* include/x86_64-signal.h (INIT_SEGV): Delete reference to nullp.
+	* include/default-signal.h (INIT_SEGV, INIT_FPE): Delete reference
+	to nullp and arithexception.
+	* include/dwarf2-signal.h (INIT_SEGV, INIT_FPE): Likewise.
+	* include/i386-signal.h (INIT_SEGV, INIT_FPE): Likewise.
+	* include/s390-signal.h (INIT_SEGV, INIT_FPE): Likewise.
+	* include/sparc-signal.h (INIT_SEGV, INIT_FPE): Likewise.
+	* include/win32-signal.h (INIT_SEGV, INIT_FPE): Likewise.
+
 2003-06-11  Andrew Haley  <aph@redhat.com>
 
 	* jni.cc (_Jv_JNI_check_types): New.
diff --git a/libjava/include/default-signal.h b/libjava/include/default-signal.h
index 492f0cacdc7602ed81d7bffceaf1099361ec80d9..1c50f5f7ec3a96e088f7c4265bfc841c56e46288 100644
--- a/libjava/include/default-signal.h
+++ b/libjava/include/default-signal.h
@@ -24,7 +24,6 @@ static void _name (int _dummy)
 #define INIT_SEGV						\
 do								\
   {								\
-    nullp = new java::lang::NullPointerException ();		\
     signal (SIGSEGV, catch_segv);				\
   }								\
 while (0)							
@@ -32,8 +31,6 @@ while (0)
 #define INIT_FPE						\
 do								\
   {								\
-    arithexception = new java::lang::ArithmeticException 	\
-      (JvNewStringLatin1 ("/ by zero"));			\
     signal (SIGFPE, catch_fpe);					\
   }								\
 while (0)
diff --git a/libjava/include/dwarf2-signal.h b/libjava/include/dwarf2-signal.h
index 7dbcd9dfd2db20ba5787b2509a662d66072e4db9..43f0cbe914f9548a2726257f80c676d4de0bb397 100644
--- a/libjava/include/dwarf2-signal.h
+++ b/libjava/include/dwarf2-signal.h
@@ -143,7 +143,6 @@ extern "C" {
 #define INIT_SEGV						\
 do								\
   {								\
-    nullp = new java::lang::NullPointerException ();    	\
     struct kernel_sigaction act;				\
     unsigned long stub = ((unsigned long)&__rt_sigreturn_stub); \
     act.k_sa_sigaction = _Jv_catch_segv;      			\
@@ -158,8 +157,6 @@ while (0)
 #define INIT_FPE						\
 do								\
   { 								\
-    arithexception = new java::lang::ArithmeticException 	\
-      (JvNewStringLatin1 ("/ by zero"));			\
     struct kernel_sigaction act;				\
     unsigned long stub = ((unsigned long)&__rt_sigreturn_stub); \
     act.k_sa_sigaction = _Jv_catch_fpe;				\
@@ -185,7 +182,6 @@ extern "C" {
 do								\
   {								\
     struct kernel_sigaction act;				\
-    nullp = new java::lang::NullPointerException ();    	\
     act.k_sa_sigaction = _Jv_catch_segv;      			\
     act.k_sa_mask = 0;						\
     act.k_sa_flags = SA_SIGINFO;	       			\
@@ -197,8 +193,6 @@ while (0)
 #define INIT_FPE						\
 do								\
   { 								\
-    arithexception = new java::lang::ArithmeticException 	\
-      (JvNewStringLatin1 ("/ by zero"));			\
     struct kernel_sigaction act;				\
     act.k_sa_sigaction = _Jv_catch_fpe;				\
     act.k_sa_mask = 0;						\
@@ -212,7 +206,6 @@ while (0)
 #define INIT_SEGV						\
 do								\
   {								\
-    nullp = new java::lang::NullPointerException ();    	\
     struct sigaction act;					\
     act.sa_sigaction = _Jv_catch_segv;      			\
     sigemptyset (&act.sa_mask);					\
@@ -224,8 +217,6 @@ while (0)
 #define INIT_FPE						\
 do								\
   { 								\
-    arithexception = new java::lang::ArithmeticException 	\
-      (JvNewStringLatin1 ("/ by zero"));			\
     struct sigaction act;					\
     act.sa_sigaction = _Jv_catch_fpe;				\
     sigemptyset (&act.sa_mask);					\
@@ -250,7 +241,6 @@ while (0)
 #define INIT_SEGV						\
 do								\
   {								\
-    nullp = new java::lang::NullPointerException ();    	\
     struct sigaction act;					\
     act.sa_sigaction = _Jv_catch_segv;      			\
     sigemptyset (&act.sa_mask);					\
@@ -262,8 +252,6 @@ while (0)
 #define INIT_FPE						\
 do								\
   { 								\
-    arithexception = new java::lang::ArithmeticException 	\
-      (JvNewStringLatin1 ("/ by zero"));			\
     struct sigaction act;					\
     act.sa_sigaction = _Jv_catch_fpe;				\
     sigemptyset (&act.sa_mask);					\
diff --git a/libjava/include/i386-signal.h b/libjava/include/i386-signal.h
index 6ad496c47a4d247c13194e59ae44ea9115c33889..869a928332c17886c954d185a8fffae3d2e43486 100644
--- a/libjava/include/i386-signal.h
+++ b/libjava/include/i386-signal.h
@@ -111,7 +111,6 @@ struct old_i386_kernel_sigaction {
 #define INIT_SEGV					\
 do							\
   {							\
-    nullp = new java::lang::NullPointerException ();	\
     struct old_i386_kernel_sigaction kact;		\
     kact.k_sa_handler = catch_segv;			\
     kact.k_sa_mask = 0;					\
@@ -123,8 +122,6 @@ while (0)
 #define INIT_FPE						\
 do								\
   {								\
-    arithexception = new java::lang::ArithmeticException	\
-      (JvNewStringLatin1 ("/ by zero"));			\
     struct old_i386_kernel_sigaction kact;			\
     kact.k_sa_handler = catch_fpe;				\
     kact.k_sa_mask = 0;						\
diff --git a/libjava/include/s390-signal.h b/libjava/include/s390-signal.h
index 44777c0672b5dd6b18807bd6f195a84d80c08d68..8b9adae05a086716c6fa41ed34c8d90d3d8fd6dc 100644
--- a/libjava/include/s390-signal.h
+++ b/libjava/include/s390-signal.h
@@ -52,7 +52,6 @@ struct old_s390_kernel_sigaction {
 #define INIT_SEGV					\
 do							\
   {							\
-    nullp = new java::lang::NullPointerException ();	\
     struct old_s390_kernel_sigaction kact;		\
     kact.k_sa_handler = catch_segv;			\
     kact.k_sa_mask = 0;					\
@@ -64,8 +63,6 @@ while (0)
 #define INIT_FPE						\
 do								\
   {								\
-    arithexception = new java::lang::ArithmeticException	\
-      (JvNewStringLatin1 ("/ by zero"));			\
     struct old_s390_kernel_sigaction kact;			\
     kact.k_sa_handler = catch_fpe;				\
     kact.k_sa_mask = 0;						\
diff --git a/libjava/include/sparc-signal.h b/libjava/include/sparc-signal.h
index 8694fc598ed372786a73ff222681f518e73f9012..1676d26396b5134a46cbdba7b6575f0de8d6d035 100644
--- a/libjava/include/sparc-signal.h
+++ b/libjava/include/sparc-signal.h
@@ -45,7 +45,6 @@ while (0)
 #define INIT_SEGV						\
 do								\
   {								\
-    nullp = new java::lang::NullPointerException ();		\
     struct sigaction act;					\
     act.sa_sigaction = catch_segv;				\
     act.sa_flags = SA_SIGINFO | SA_NODEFER;			\
@@ -57,8 +56,6 @@ while (0)
 #define INIT_FPE						\
 do								\
   {								\
-    arithexception = new java::lang::ArithmeticException 	\
-      (JvNewStringLatin1 ("/ by zero"));			\
     struct sigaction act;					\
     act.sa_flags = SA_SIGINFO | SA_NODEFER;			\
     act.sa_sigaction = catch_fpe;				\
diff --git a/libjava/include/win32-signal.h b/libjava/include/win32-signal.h
index e12c3c3668125c54b1b901a6b3ed9e5fe57a5753..8d8a9e2d5bfad51069f266609d07b2546a249dd0 100644
--- a/libjava/include/win32-signal.h
+++ b/libjava/include/win32-signal.h
@@ -26,7 +26,6 @@ static void _name (int _dummy)
 #define INIT_SEGV						\
 do								\
   {								\
-    nullp = new java::lang::NullPointerException ();		\
   }								\
 while (0)
 
@@ -34,8 +33,6 @@ while (0)
 #define INIT_FPE						\
 do								\
   {								\
-    arithexception = new java::lang::ArithmeticException 	\
-      (JvNewStringLatin1 ("/ by zero"));			\
   }								\
 while (0)
 
diff --git a/libjava/include/x86_64-signal.h b/libjava/include/x86_64-signal.h
index 54095a96df3981666e3d6e2798e5f972bb0166c9..eb034473f9eadfff5a8b9d65f08131c57bc6e957 100644
--- a/libjava/include/x86_64-signal.h
+++ b/libjava/include/x86_64-signal.h
@@ -64,7 +64,6 @@ static void restore_rt (void) asm ("__restore_rt");
 #define INIT_SEGV						\
 do								\
   {								\
-    nullp = new java::lang::NullPointerException ();		\
     struct kernel_sigaction act;				\
     act.k_sa_sigaction = _Jv_catch_segv;			\
     sigemptyset (&act.k_sa_mask);				\
diff --git a/libjava/prims.cc b/libjava/prims.cc
index 9ddd1d2c2af9654bbbc64329ba007d8fc392a190..8d9cc6d97d7f2c7070b3b9ceaa4627608dcdafcf 100644
--- a/libjava/prims.cc
+++ b/libjava/prims.cc
@@ -122,39 +122,27 @@ void (*_Jv_JVMPI_Notify_THREAD_END) (JVMPI_Event *event);
 #endif
 
 
-extern "C" void _Jv_ThrowSignal (jthrowable) __attribute ((noreturn));
-
-// Just like _Jv_Throw, but fill in the stack trace first.  Although
-// this is declared extern in order that its name not be mangled, it
-// is not intended to be used outside this file.
-void 
-_Jv_ThrowSignal (jthrowable throwable)
-{
-  throwable->fillInStackTrace ();
-  throw throwable;
-}
- 
 #ifdef HANDLE_SEGV
-static java::lang::NullPointerException *nullp;
-
 SIGNAL_HANDLER (catch_segv)
 {
+  java::lang::NullPointerException *nullp 
+    = new java::lang::NullPointerException;
   MAKE_THROW_FRAME (nullp);
-  _Jv_ThrowSignal (nullp);
+  throw nullp;
 }
 #endif
 
-static java::lang::ArithmeticException *arithexception;
-
 #ifdef HANDLE_FPE
 SIGNAL_HANDLER (catch_fpe)
 {
+  java::lang::ArithmeticException *arithexception 
+    = new java::lang::ArithmeticException (JvNewStringLatin1 ("/ by zero"));
 #ifdef HANDLE_DIVIDE_OVERFLOW
   HANDLE_DIVIDE_OVERFLOW;
 #else
   MAKE_THROW_FRAME (arithexception);
 #endif
-  _Jv_ThrowSignal (arithexception);
+  throw arithexception;
 }
 #endif
 
@@ -921,9 +909,6 @@ _Jv_CreateJavaVM (void* /*vm_args*/)
   INIT_SEGV;
 #ifdef HANDLE_FPE
   INIT_FPE;
-#else
-  arithexception = new java::lang::ArithmeticException
-    (JvNewStringLatin1 ("/ by zero"));
 #endif
   
   no_memory = new java::lang::OutOfMemoryError;
@@ -1093,7 +1078,11 @@ jint
 _Jv_divI (jint dividend, jint divisor)
 {
   if (__builtin_expect (divisor == 0, false))
-    _Jv_ThrowSignal (arithexception);
+    {
+      java::lang::ArithmeticException *arithexception 
+	= new java::lang::ArithmeticException (JvNewStringLatin1 ("/ by zero"));      
+      throw arithexception;
+    }
   
   if (dividend == (jint) 0x80000000L && divisor == -1)
     return dividend;
@@ -1105,11 +1094,15 @@ jint
 _Jv_remI (jint dividend, jint divisor)
 {
   if (__builtin_expect (divisor == 0, false))
-    _Jv_ThrowSignal (arithexception);
+    {
+      java::lang::ArithmeticException *arithexception 
+	= new java::lang::ArithmeticException (JvNewStringLatin1 ("/ by zero"));      
+      throw arithexception;
+    }
   
   if (dividend == (jint) 0x80000000L && divisor == -1)
     return 0;
-
+  
   return dividend % divisor;
 }
 
@@ -1117,8 +1110,12 @@ jlong
 _Jv_divJ (jlong dividend, jlong divisor)
 {
   if (__builtin_expect (divisor == 0, false))
-    _Jv_ThrowSignal (arithexception);
-  
+    {
+      java::lang::ArithmeticException *arithexception 
+	= new java::lang::ArithmeticException (JvNewStringLatin1 ("/ by zero"));      
+      throw arithexception;
+    }
+
   if (dividend == (jlong) 0x8000000000000000LL && divisor == -1)
     return dividend;
 
@@ -1129,8 +1126,12 @@ jlong
 _Jv_remJ (jlong dividend, jlong divisor)
 {
   if (__builtin_expect (divisor == 0, false))
-    _Jv_ThrowSignal (arithexception);
-  
+    {
+      java::lang::ArithmeticException *arithexception 
+	= new java::lang::ArithmeticException (JvNewStringLatin1 ("/ by zero"));      
+      throw arithexception;
+    }
+
   if (dividend == (jlong) 0x8000000000000000LL && divisor == -1)
     return 0;