Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
5.0M5
-
None
-
None
-
Linux/32, Windows/64, Interpreter
Description
The following simple test sometimes causes a stack overflow.
public class Test {
static interface Sample1
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
catch (StackOverflowError e)
{ System.out.println("Main thread: ERROR: "); e.printStackTrace(System.out); } success = false;
Thread thread = new Thread() {
public void run() {
try
catch (Throwable e)
{ System.out.println("Child thread: ERROR: "); e.printStackTrace(System.out); } }
};
thread.start();
}
}
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:
http://people.apache.org/~smishura/r650380/Linux_x86/drlvm-test/
Now the test is commented out, but the proper fix would be to increase the stack size in interpreter mode and uncomment the test.
Attachments
Issue Links
- is related to
-
HARMONY-5622 [drlvm][kernel][geronimo] Method.getGeneric*() methods throw NPE for parametrized interface methods
-
- Closed
-