[pypy-svn] r60869 - pypy/trunk/pypy/translator/c/src

pedronis at codespeak.net pedronis at codespeak.net
Sat Jan 10 14:30:50 CET 2009


Author: pedronis
Date: Sat Jan 10 14:30:48 2009
New Revision: 60869

Modified:
   pypy/trunk/pypy/translator/c/src/main.h
   pypy/trunk/pypy/translator/c/src/obmalloc.c
Log:
behave more like CPython does and abort(),  this in particular should give us an exitcode that is not 1 which is what py.test uses
for some tests have failed, which results in our nightly testrunner believing that some test file passed with some failures
when what really happened is that pypy-c failed fatally :(



Modified: pypy/trunk/pypy/translator/c/src/main.h
==============================================================================
--- pypy/trunk/pypy/translator/c/src/main.h	(original)
+++ pypy/trunk/pypy/translator/c/src/main.h	Sat Jan 10 14:30:48 2009
@@ -41,7 +41,7 @@
         fprintf(stderr, "Fatal RPython error: %s\n",
                 RPyFetchExceptionType()->ov_name->items);
 #endif
-        exitcode = 1;
+        abort();
     }
     return exitcode;
 
@@ -51,7 +51,7 @@
 #ifndef AVR
     fprintf(stderr, "Fatal error during initialization: %s\n", errmsg);
 #endif
-    return 1;
+    abort();
 }
 
 #endif /* PYPY_NOT_MAIN_FILE */

Modified: pypy/trunk/pypy/translator/c/src/obmalloc.c
==============================================================================
--- pypy/trunk/pypy/translator/c/src/obmalloc.c	(original)
+++ pypy/trunk/pypy/translator/c/src/obmalloc.c	Sat Jan 10 14:30:48 2009
@@ -898,7 +898,7 @@
 void Py_FatalError(const char *msg)
 {
   fprintf(stderr, "Py_FatalError() called in obmalloc!\n%s\n", msg);
-  exit(1);
+  abort();
 }
 #define PyOS_snprintf snprintf
 /* end of XXX */



More information about the Pypy-commit mailing list