Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 94570 invoked from network); 21 Jul 2006 11:20:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jul 2006 11:20:28 -0000 Received: (qmail 18021 invoked by uid 500); 21 Jul 2006 11:20:28 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 17995 invoked by uid 500); 21 Jul 2006 11:20:28 -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 17984 invoked by uid 99); 21 Jul 2006 11:20:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 04:20:28 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 04:20:27 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ABDDA41000B for ; Fri, 21 Jul 2006 11:18:14 +0000 (GMT) Message-ID: <8725894.1153480694701.JavaMail.jira@brutus> Date: Fri, 21 Jul 2006 04:18:14 -0700 (PDT) From: "Pavel Afremov (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Updated: (HARMONY-945) Current implementation of DRL VM doesn't support Stack Overflow Error (SOE). In-Reply-To: <12460530.1153479913946.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-945?page=all ] Pavel Afremov updated HARMONY-945: ---------------------------------- Attachment: 0001-This-patch-adds-support-of-Stack-Overflow-Error-SOE-for-JIT-mode-into-VM.patch This patch adds support of Stack Overflow Error (SOE) for DRL VM in JIT mode. It's implementation for both Windows and Linux ia32 platforms based on protected page on the stack. There are two main schemes of SOE processing here: 1) If current frame is unwindable (usual java code) signal handler or vectored exception handler throw usual java exception. 2) If current frame is nonunwindable (JNI native code for example) VM sets exceptions for the current thread and continues its execution from interrupted. place. A code which works in nonunwindable mode should periodically check that no exception is raised. This implementation discover some problems in current VM implementation (including JIT): 1) Some parts of VM which use long recursion calls in nonunwindable mode (JIT compiler, verifier) don't check that SOE is happened. I implemented check that there are 256 Kbytes of free stack, before start compilation. But I'm afraid it can be not enough sometimes. 2) If SOE throws during the first two command of compiled method, function "unwind" of the JIT can't unwind frame correctly sometimes. > Current implementation of DRL VM doesn't support Stack Overflow Error (SOE). > ---------------------------------------------------------------------------- > > Key: HARMONY-945 > URL: http://issues.apache.org/jira/browse/HARMONY-945 > Project: Harmony > Issue Type: New Feature > Components: DRLVM > Reporter: Pavel Afremov > Attachments: 0001-This-patch-adds-support-of-Stack-Overflow-Error-SOE-for-JIT-mode-into-VM.patch > > > Current implementation of DRL VM doesn't support Stack Overflow Error (SOE). > Following example shows it: > > public class Stack { > static int depth = 0; > public static void func() { > depth++; > func(); > } > public static void main(String[] args) { > try { > func(); > } catch (Throwable th) { > System.out.println("First SOE depth = " + depth); > System.out.println ("Caught = " + th); > } > } > } > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira