Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 340 invoked from network); 9 Sep 2006 16:30:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Sep 2006 16:30:08 -0000 Received: (qmail 369 invoked by uid 500); 9 Sep 2006 16:30:06 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 332 invoked by uid 500); 9 Sep 2006 16:30:06 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 321 invoked by uid 99); 9 Sep 2006 16:30:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Sep 2006 09:30:06 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Sep 2006 09:30:06 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 117E11A981D; Sat, 9 Sep 2006 09:29:46 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: harmony-commits@incubator.apache.org From: geirm@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20060909162946.117E11A981D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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();