harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-5790) [drlvm][interpreter] Stack size is not enough
Date Thu, 24 Apr 2008 15:51:22 GMT
[drlvm][interpreter] Stack size is not enough

                 Key: HARMONY-5790
                 URL: https://issues.apache.org/jira/browse/HARMONY-5790
             Project: Harmony
          Issue Type: Bug
          Components: build - test - ci, DRLVM
    Affects Versions: 5.0M5
         Environment: Linux/32, Windows/64, Interpreter
            Reporter: Vasily Zakharov

The following simple test sometimes causes a stack overflow.

public class Test {
    static interface Sample1 {
        public <T extends Sample1, E extends Throwable> T test(T param) throws E;
    static interface Sample2 {
        public <T extends Sample2, E extends Throwable> T test(T param) throws E;
    static boolean success;
    public static void main(String[] args) {
        try {
            System.out.println("Main thread: OK");
        } catch (StackOverflowError e) {
            System.out.println("Main thread: ERROR: ");
        success = false;
        Thread thread = new Thread() {
            public void run() {
                try {
                    System.out.println("Child thread: OK");
                } catch (Throwable e) {
                    System.out.println("Child thread: ERROR: ");

As the test is very simple and only makes a one trivial reflection call in main and child
threads, it seems evident that stack size is just not enough for the Interpreter to work and
needs to be increased.

The error was discovered as test java.lang.reflect.MethodTest.test_getGeneric(), that is a
regression test for HARMONY-5622 was failing in main thread on Windows/64, and in a separate
thread on Linux/32.

Now the test is commented out, but the proper fix would be to increase the stack size in interpreter
mode and uncomment the test.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message