Relates :
|
|
Relates :
|
|
Relates :
|
With the internal testing option -XX:+DeoptimizeALot, running the SPECJVM98 test _213_javac fails with NullPointerException. While this started occurring with the 20070413103655.jrose.dolphin-intrinsics putback, it is actually an existing incompatibility between the deoptimization support and the intrinsic inlining of the server compiler. The following program demonstrates the problem: import java.util.Vector; class deoptTest { Vector<Integer> _numbers; deoptTest(Vector<Integer> numbers) { _numbers = numbers; } void addElements(int start, int end) { for (int i = start; i < end; i++) { _numbers.add(Integer.valueOf(i)); int sz = _numbers.size(); if ((sz % 10000) == 0) System.out.println("+++ vector size = " + sz); } } static public void main(String args[]) { // create a Vector with an absurdly low initial size and capacity increment // to force constant reallocation Vector<Integer> numbers = new Vector<Integer>(100, 10); deoptTest dot = new deoptTest(numbers); for (int i = 0; i < 100; i++) { dot.addElements(0, 999); } for (int i = 0; i < 100; i++) { dot.addElements(0, 999); } for (int i = 0; i < 1000; i++) { dot.addElements(0, 999); } for (int i = 0; i < 1000; i++) { dot.addElements(0, 999); } } } When the fastdebug VM is run with the -XX:+DeoptimizeALot flag, it will fail with an assertion that indicates that the interpreter stack is corrupted. If the -XX:+VerifyStack option is added, it will fail an assert at the deoptimization point.
|