This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 9117 - fastjavac generates invalid bytecode! ClassFormatError
Summary: fastjavac generates invalid bytecode! ClassFormatError
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P2 critical (vote)
Assignee: Ivan Bradac
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-01-16 16:33 UTC by sapex
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sapex 2001-01-16 16:33:18 UTC
The following class compiles OK with fastjavac (and jikes and javac)
A runtime error is throwed only if compiled with fastjavac...


public class CompilerBugTwo
{
    public static void main (String[] args) throws Exception
    {
        Class c = Toto.class.getDeclaringClass();
        System.err.println (c);
    }
}

class Toto
{
    private void set (Node node)
    {
        node.children[0] = new Node ();
    }

    private static class Node
    {
        private Node[] children;

        private Node ()
        {
        }
    }
}


The stack trace:

java.lang.ClassFormatError: Toto$1 (Bad superclass index)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
        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:297)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
        at java.lang.Class.getDeclaringClass(Native Method)
        at CompilerBugTwo.main(CompilerBugTwo.java:8)
Comment 1 Svata Dedic 2001-01-17 16:01:59 UTC
As other team does fastjavac development, there's nothing we can do for fixing
the bug than hand over the bug descriptions to the responsible team (already
done). We will send out a message to nbusers@ and nbdev@ if/when new release of
fastjavac will be available.
Comment 2 Svata Dedic 2001-02-14 13:57:59 UTC
Reopening/reassigning to Sustaining team.
Comment 3 Ivan Bradac 2001-02-16 12:33:37 UTC
Has been forwarded to the Sun's fastjavac team.
Comment 4 Ivan Bradac 2001-02-27 10:03:14 UTC
Fixed in Dev-132.
Comment 5 Ivan Bradac 2001-02-27 10:03:35 UTC
Fixed in Dev-132.
Comment 6 Jan Becicka 2001-03-02 15:24:50 UTC
[dev-136] Verified
Comment 7 Quality Engineering 2003-07-01 13:15:45 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.