Bug 25185 - ClassFormatError compiling a method with a compilation problem
Summary: ClassFormatError compiling a method with a compilation problem
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 critical (vote)
Target Milestone: 2.1 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-22 09:46 EDT by Olivier Thomann CLA
Modified: 2002-11-14 10:37 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2002-10-22 09:46:47 EDT
Using 1118, I got a ClassFormatError when I tried to run a class that contained
a compile error.
java.lang.ClassFormatError: org/eclipse/jdt/internal/compiler/parser/Scanner
(Invalid start_pc/length in local var table)
	at java.lang.ClassLoader.defineClass0(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
	at ScannerTest.main(ScannerTest.java:12)
Exception in thread "main" 

This class is the Scanner class having a local variable used. The bug is not in
the problem method, but in two other methods. I will investigate in self hosting.
Comment 1 Olivier Thomann CLA 2002-10-22 11:51:51 EDT
The problem was due to a resize in the byte array and the fact that in some
cases I don't store a 0 in the array. Instead I was offset the index by 2.
Fixed and released in 2.1 stream.
Comment 2 David Audel CLA 2002-11-14 10:37:49 EST
Verified.