Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4285716
Votes 1
Synopsis native stack overflow causes crash on Solaris
Category hotspot:runtime_system
Reported Against kestrel
Release Fixed
State 11-Closed, Not Reproducible, bug
Priority: 4-Low
Related Bugs 4298656
Submit Date 28-OCT-1999
Description




The regression test (testbase_nsk) nsk/regression/b4278848 crashes
HotSpot 1.3fcs-M (Solaris) VM with Segmentation Fault.

See logs and source below.
Comments in source code indicate the line that causes the crash.

% java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-L)
Java HotSpot (TM) Client VM (build 1.3-M, interpreted mode)

%java b4278848
Segmentation Fault

------------------------------ source text of test: .java -----------------------
import java.lang.reflect.*;

public class b4278848 implements Runnable {

    static int v_depth = 0;
    static Method v_method;
    static Thread v_thread;
    static int v_test_result;

    public static void test(Method p_method) throws Throwable {
        ++v_depth;

// this line instead of the next line => HotSparc (build 1.3-M) works perfectly
//        System.out.println("Test at depth " + v_depth);

// this line instead of the preceding line => HotSparc (build 1.3-M) : Segmentation Fault
        System.out.print("Test at depth " + v_depth+"\r"); 

        Object[] args = {p_method};
        try
        {
            p_method.invoke(null, args);
        }
        catch (InvocationTargetException e)
        {
            throw e.getTargetException();
        }
    }

    public void run() {
        try {
            Class c = b4278848.class;
            Class[] sig = {Method.class};
            v_method = c.getMethod("test", sig);
            test(v_method);
        }
        catch (Throwable e)
        {
            if (e instanceof StackOverflowError) {
                 v_test_result=0/*STATUS_PASSED*/;
            }
        }
    }

    public static int run(String argv[], java.io.PrintStream out) {
        v_test_result=2/*STATUS_FAILED*/;
        v_thread=new Thread(new b4278848());
        v_thread.start();
        try {
            v_thread.join();
        }
        catch (InterruptedException e) {
        }
        return v_test_result;
    }
    public static void main(String argv[]) {
        System.exit(run(argv, System.out) + 95/*STATUS_TEMP*/);
    }
} // end of class b4278848
-------------------------------end of text of test -----------------------

======================================================================
Work Around
N/A
Evaluation
  xxxxx@xxxxx   2001-01-05

Test passes using 1.3 fcs on solaris; also bug 4298656 addresses 
several related stack overflow handling problems to be fixed in merlin.
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang