(unwind_cleanup): Print error message and then abort. This function must never be...
authorUlrich Drepper <drepper@redhat.com>
Fri, 9 May 2003 03:00:52 +0000 (03:00 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 9 May 2003 03:00:52 +0000 (03:00 +0000)
nptl/unwind.c

index 7529174..f6537ba 100644 (file)
@@ -50,7 +50,13 @@ unwind_stop (int version, _Unwind_Action actions,
 static void
 unwind_cleanup (_Unwind_Reason_Code reason, struct _Unwind_Exception *exc)
 {
-  /* Nothing to do.  */
+  /* When we get here a C++ catch block didn't rethrow the object.  We
+     cannot handle this case and therefore abort.  */
+# define STR_N_LEN(str) str, strlen (str)
+  INTERNAL_SYSCALL_DECL (err);
+  INTERNAL_SYSCALL (write, err, 3, STDERR_FILENO,
+                   STR_N_LEN ("FATAL: exception not rethrown\n"));
+  abort ();
 }
 
 #endif /* have forced unwind */