-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0, 1.3.0, 1.4.0
-
beta
-
generic, x86
-
generic, linux, solaris_7
The VM fails to verify the attached class file, which was generated with
a recent javac. Here is the source:
class SwitchFence {
public static final int MEMENTO_NULL = 0x7FFFFFFD;
public static final int MEMENTO_ALLE = 0x7FFFFFFE;
public static final int MEMENTO_LEER = 0x7FFFFFFF;
public static void main(String[] args) throws Exception {
int i = MEMENTO_LEER;
switch (i) {
case MEMENTO_NULL:
throw new Exception("fail");
case MEMENTO_ALLE:
throw new Exception("fail");
case MEMENTO_LEER:
break;
}
}
}
a recent javac. Here is the source:
class SwitchFence {
public static final int MEMENTO_NULL = 0x7FFFFFFD;
public static final int MEMENTO_ALLE = 0x7FFFFFFE;
public static final int MEMENTO_LEER = 0x7FFFFFFF;
public static void main(String[] args) throws Exception {
int i = MEMENTO_LEER;
switch (i) {
case MEMENTO_NULL:
throw new Exception("fail");
case MEMENTO_ALLE:
throw new Exception("fail");
case MEMENTO_LEER:
break;
}
}
}
- duplicates
-
JDK-4223705 (verifier) VerifyError for switch statements with large constants
- Closed
- relates to
-
JDK-4368309 Simple switch statement with large case values gives OutOfMemoryError in javac
- Closed