-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b50
-
x86
-
windows_xp
###@###.### 2004-04-22
J2SE Version (please include all output from java -version flag):
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b46)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b46, mixed mode, sharing)
Does this problem occur on J2SE 1.4 or 1.4.1 or 1.4.2? Yes / No (pick one)
n/a
Operating System Configuration Information (be specific):
Windows XP Professional Version 2002 Service Pack 1
Hardware Configuration Information (be specific):
Intel Pentium 4 2.66GHz 512M RAM
Bug Description:
Certain configurations of code and compiler options produce
a stack trace when doing an hprof of heap. (See steps below to reproduce.)
Exception in thread "main" java.lang.ClassFormatError: LVTT entry for 'l' in class file T does not match any LVT entry
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:605)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279)
at java.lang.ClassLoader.loadClass(ClassLoader.java:236)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:303)
Steps to Reproduce (be specific):
Code:
public class T {
public static void main(String[] args) {
java.util.List<String> l = new java.util.ArrayList<String>();
String.format("%s", "");
}
}
Compile & execute:
javac -g:vars -source 1.5 T.java
java -cp . -agentlib:hprof=heap=dump T
Note that three things must be in place to duplicate this problem:
both lines of code in the main method (including instantiation,
assignment to the local, and call to the format method),
and debug-vars (g:vars) must be set. If you eliminate any of
those three you no longer receive a stack trace.