Explorar o código

* Raise SIGFPE after catching it

Bryan Drewery %!s(int64=16) %!d(string=hai) anos
pai
achega
2c82e1588c
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      src/debug.c

+ 5 - 1
src/debug.c

@@ -195,7 +195,11 @@ static void got_fpe(int z)
 {
   write_debug();
   fatal("FLOATING POINT ERROR -- CRASHING!", 0);
-  exit(1);		/* for GCC noreturn */
+#ifdef DEBUG
+  raise(SIGFPE);
+#else
+  exit(1);
+#endif /* DEBUG */
 }
 
 static void got_term(int) __attribute__ ((noreturn));