harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r441813 - in /incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util: linux/signals_ia32.cpp win/ia32/nt_exception_filter.cpp
Date Sat, 09 Sep 2006 16:29:45 GMT
Author: geirm
Date: Sat Sep  9 09:29:45 2006
New Revision: 441813

URL: http://svn.apache.org/viewvc?view=rev&rev=441813
Log:
fixes for HARMONY-1364

Applied - note we're not passing smoke tests at this point
due to other reasons.

Modified:
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ia32/nt_exception_filter.cpp

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp?view=diff&rev=441813&r1=441812&r2=441813
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp Sat Sep
 9 09:29:45 2006
@@ -262,6 +262,17 @@
 
 void set_guard_stack() {
     int err;
+    
+    /*
+     * have the stack parameters been initialized?
+     * 
+     * TODO - fix this - this probably should be elsewhere
+     */
+
+    if(!p_TLS_vmthread->stack_addr) {
+        init_stack_info();
+    }
+    
     char* stack_addr = (char*) get_stack_addr();
     size_t stack_size = get_stack_size();
     size_t guard_stack_size = get_guard_stack_size();
@@ -270,12 +281,16 @@
     err = mprotect(stack_addr - stack_size + guard_page_size + guard_stack_size,
         guard_page_size, PROT_NONE);
 
+    assert(!err);
+    
     stack_t sigalt;
     sigalt.ss_sp = stack_addr - stack_size + guard_page_size;
     sigalt.ss_flags = SS_ONSTACK;
     sigalt.ss_size = guard_stack_size;
 
     err = sigaltstack (&sigalt, NULL);
+    
+    assert(!err);
 }
 
 size_t get_available_stack_size() {

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ia32/nt_exception_filter.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ia32/nt_exception_filter.cpp?view=diff&rev=441813&r1=441812&r2=441813
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ia32/nt_exception_filter.cpp
(original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ia32/nt_exception_filter.cpp
Sat Sep  9 09:29:45 2006
@@ -227,6 +227,17 @@
 }
 
 void set_guard_stack() {
+    
+    /*
+     * have the stack parameters been initialized?
+     * 
+     * TODO - fix this - this probably should be elsewhere
+     */
+
+    if(!p_TLS_vmthread->stack_addr) {
+        init_stack_info();
+    }
+  
     void* stack_addr = get_stack_addr();
     size_t stack_size = get_stack_size();
     size_t page_size = get_guard_page_size();



Mime
View raw message