You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ge...@apache.org on 2005/10/10 15:49:04 UTC

svn commit: r312653 - /incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/thread.c

Author: geirm
Date: Mon Oct 10 06:49:02 2005
New Revision: 312653

URL: http://svn.apache.org/viewcvs?rev=312653&view=rev
Log:
Message if we're going down due to stack issue

Modified:
    incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/thread.c

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/thread.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/thread.c?rev=312653&r1=312652&r2=312653&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/thread.c (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/thread.c Mon Oct 10 06:49:02 2005
@@ -370,6 +370,8 @@
                                           rint                priority,
                                           rboolean            isdaemon)
 {
+	
+	
     /*
      * Declare slot in use, but not initialized.
      * (Redundant for most situations where
@@ -383,15 +385,22 @@
     /* Check for stack overflow if this frame is loaded */
     ClassFile *pcfs = CLASS_OBJECT_LINKAGE(clsidx)->pcfs;
     Code_attribute *pca = (Code_attribute *)
-                         &pcfs->methods[mthidx]->attributes[codeatridx];
+                         &pcfs->methods[mthidx]->attributes[codeatridx]->ai;
 
     /* Check if this causes stack overflow, throw StackOverflowError */
-    if (JVMCFG_MAX_SP <= GET_SP(thridx) +
+    if (JVMCFG_MAX_SP <= (ruint)( GET_SP(thridx) +
                          JVMREG_STACK_MIN_FRAME_HEIGHT +
                          JVMREG_STACK_PC_HEIGHT +
                          pca->max_stack +
-                         pca->max_locals)
+                         pca->max_locals))
     {
+       sysDbgMsg(0,"thread.c", "thread_new_common() she's gonna blow! %d %d %d - %d %d\n",
+       	thridx, JVMCFG_MAX_SP, (ruint)(GET_SP(thridx) +
+                         JVMREG_STACK_MIN_FRAME_HEIGHT +
+                         JVMREG_STACK_PC_HEIGHT +
+                         pca->max_stack +
+                         pca->max_locals), pca->max_stack, pca->max_locals);
+       	
         exit_throw_exception(EXIT_THREAD_STACK,
                              JVMCLASS_JAVA_LANG_STACKOVERFLOWERROR);
 /*NOTREACHED*/
@@ -688,7 +697,7 @@
                                    rboolean          usesystemthread,
                                    rboolean        find_registerNatives)
 {
-    /*
+     /*
      * Attempt to load requested class.  Notice that
      * an object is @e not being instantiated here,
      * so the @b arraylength parm (parm 3) can be
@@ -698,7 +707,7 @@
                                                    find_registerNatives,
                                                     (jint *) rnull);
 
-    /* Point to @e this class structure, then get immediate superclass*/
+     /* Point to @e this class structure, then get immediate superclass*/
     ClassFile *pcfs         = CLASS_OBJECT_LINKAGE(clsidx)->pcfs;
     ClassFile *pcfs_recurse = pcfs;