-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[upstream]art-test 407-arrays c2 jit run fail #75
Comments
裁剪结果为:-Xcomp选项运行,导致数组越界异常信息丢失: class Main {
public static void main(String[] a) {
b(new boolean[2], 2);
b(new boolean[2], 4);
b(new boolean[2], -1);
b(new boolean[2], Integer.MIN_VALUE);
}
static void b(boolean[] array, int i) {
ArrayIndexOutOfBoundsException d = null;
try {
f(array, i);
} catch (ArrayIndexOutOfBoundsException e) {
d = e;
}
assertTrue(d.toString().contains(Integer.toString(i)), d.toString());
try {
h(array, i);
} catch (ArrayIndexOutOfBoundsException e) {
}
}
static void f(boolean[] array, int c) {
boolean i = array[c];
}
static void h(boolean[] array, int c) {
}
static void assertTrue(boolean b, String string) {
System.out.println(string);
if (!b)
throw new AssertionError();
}
} |
Further reduction, filed as https://bugs.openjdk.org/browse/JDK-8311623
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TestCase.java.txt
Main.java.txt
The text was updated successfully, but these errors were encountered: