harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r479972 - in /harmony/enhanced/drlvm/trunk/vm/vmcore/src: stack/stack_dump.cpp util/linux/signals_ia32.cpp
Date Tue, 28 Nov 2006 10:11:59 GMT
Author: varlax
Date: Tue Nov 28 02:11:59 2006
New Revision: 479972

URL: http://svn.apache.org/viewvc?view=rev&rev=479972
Log:
Applied HARMONY-1653 [drlvm] endless loop with "SIGABRT in VM code.
Tested on SUSE9

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/stack/stack_dump.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/stack/stack_dump.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/stack/stack_dump.cpp?view=diff&rev=479972&r1=479971&r2=479972
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/stack/stack_dump.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/stack/stack_dump.cpp Tue Nov 28 02:11:59 2006
@@ -27,6 +27,7 @@
 #include "Class.h"
 #include "class_member.h"
 #include "stack_trace.h"
+#include "interpreter_exports.h"
 #include "cci.h"
 
 #ifdef PLATFORM_NT
@@ -212,11 +213,14 @@
 }
 
 void st_print_stack(Registers* regs) {
+    if(interpreter_enabled()) {
+       interpreter.stack_dump(get_thread_ptr());
+       return;
+    }
     jint num_frames;
     native_frame_t* frames;
     num_frames = walk_native_stack_registers(regs, p_TLS_vmthread, -1, NULL);
     frames = (native_frame_t*) STD_ALLOCA(sizeof(native_frame_t) * num_frames);
-    
     num_frames = walk_native_stack_registers(regs, p_TLS_vmthread, num_frames, frames);
     StackIterator* si = si_create_from_native();
     fprintf(stderr, "Stack trace:\n");

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp?view=diff&rev=479972&r1=479971&r2=479972
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp Tue Nov 28 02:11:59
2006
@@ -638,9 +638,17 @@
     Registers regs;
     ucontext_t *uc = (ucontext_t *)context;
     linux_ucontext_to_regs(&regs, uc);
+    
+    // reset handler to avoid loop in case st_print_stack fails
+    struct sigaction sa;
+    sigemptyset(&sa.sa_mask);
+    sa.sa_flags = 0;
+    sa.sa_handler = SIG_DFL;
+    sigaction(SIGABRT, &sa, NULL);
+
     st_print_stack(&regs);
 
-    signal(signum, 0);
+    signal(signum, SIG_DFL);
 }
 
 /*



Mime
View raw message