harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r525916 - in /harmony/enhanced/drlvm/trunk/vm: interpreter/src/interp_exports.cpp interpreter/src/interpreter.cpp vmcore/src/jni/jni.cpp vmcore/src/stack/stack_trace.cpp vmcore/src/util/linux/signals_em64t.cpp
Date Thu, 05 Apr 2007 17:57:25 GMT
Author: gshimansky
Date: Thu Apr  5 10:57:24 2007
New Revision: 525916

URL: http://svn.apache.org/viewvc?view=rev&rev=525916
Log:
Fixed the following problems in FatalError JNI function to make shutdown.FatalError to stably
pass:

* Fixed exit function. When standard exit() is used, C++ destructors for static objects are
executed. In this case other threads which use these static usually crash. This happens most
often in JIT code which seems to use a lot of static C++ objects. Instead FatalError will
use _exit() which doesn't execute C++ destructors.

* Fixed stack trace from interpreter to go to stdout instead of stderr and be flushed after
output.


Modified:
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/stack/stack_trace.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp?view=diff&rev=525916&r1=525915&r2=525916
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp Thu Apr  5 10:57:24
2007
@@ -91,7 +91,7 @@
 extern jbyte interpreter_ti_set_breakpoint(jmethodID method, jlocation location);
 extern void interpreter_ti_clear_breakpoint(jmethodID method, jlocation location, jbyte saved);
 extern jvmtiError interpreter_ti_pop_frame(jvmtiEnv*, VM_thread *thread);
-extern void stack_dump(VM_thread *thread);
+extern void stack_dump(FILE *f, VM_thread *thread);
 
 extern FrameHandle* interpreter_get_last_frame(class VM_thread *thread);
 extern FrameHandle* interpreter_get_prev_frame(FrameHandle* frame);

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp?view=diff&rev=525916&r1=525915&r2=525916
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp Thu Apr  5 10:57:24 2007
@@ -2461,6 +2461,11 @@
     }
 }
 
+void stack_dump(FILE *f, VM_thread *thread) {
+    StackFrame *frame = getLastStackFrame(thread);
+    stackDump(f, *frame);
+}
+
 void stack_dump(VM_thread *thread) {
     StackFrame *frame = getLastStackFrame(thread);
     stackDump(stderr, *frame);

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp?view=diff&rev=525916&r1=525915&r2=525916
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp Thu Apr  5 10:57:24 2007
@@ -812,7 +812,7 @@
     st_print(stdout, hythread_self());
 
     // Return 1 to be compatible with RI.
-    exit(1);
+    _exit(1);
 } //FatalError
 
 jobject JNICALL NewGlobalRef(JNIEnv * jni_env, jobject obj)

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/stack/stack_trace.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/stack/stack_trace.cpp?view=diff&rev=525916&r1=525915&r2=525916
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/stack/stack_trace.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/stack/stack_trace.cpp Thu Apr  5 10:57:24 2007
@@ -265,7 +265,8 @@
     fprintf(f, "The stack trace of the %p java thread:\n", vm_thread);
 
     if (interpreter_enabled()) {
-        interpreter.stack_dump(vm_thread);
+        interpreter.stack_dump(f, vm_thread);
+        fflush(f);
         return;
     }
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp?view=diff&rev=525916&r1=525915&r2=525916
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp Thu Apr  5 10:57:24
2007
@@ -582,4 +582,5 @@
 
 void shutdown_signals() {
     //FIXME: should be defined in future
-} //shutdown_signals
\ No newline at end of file
+} //shutdown_signals
+



Mime
View raw message