[kaffe] completed bytecode verifier!

Timothy Stack stack at cs.utah.edu
Thu Aug 7 08:48:02 PDT 2003


> 
> Hi all,
> 
> I just committed the bytecode verifier.  It's a huge chunk of code and
> it's very likely that there are little bugs lurking around in it...I can't
> even count how many off-by-one errors I had during development.

make  check-TESTS
make[1]: Entering directory `/z/stack/tmp0/kbuild/test/regression'
PASS: HelloWorldApp.class.save
error compiling:
java.lang.NoClassDefFoundError: Lat/dms/kjc/KjcSignatureParser;
   <<No stacktrace available>>
FAIL: HelloWorldApp.java
error compiling:
java.lang.NoClassDefFoundError: Lat/dms/kjc/KjcSignatureParser;
   <<No stacktrace available>>
FAIL: TestIntLong.java
error compiling:
java.lang.NoClassDefFoundError: Lat/dms/kjc/KjcSignatureParser;
   <<No stacktrace available>>

> - The new instruction cannot be used to create an instance of an abstract
>   class.
> 
>   This should be checked, but it cannot be checked by the verifier because
>   the verifier cannot load classes unless they are necessary for type
>   checking.  Thus if the type of class created by the new instruction is
>   not loaded, there's no way to check if it's abstract.
> 
>   This should be checked in code-analyse.

This isn't done for the sake of binary compatibility.  For example, if a 
base class adds an abstract method, you don't want to screw up any 
subclasses in different packages if the method isn't going to be called.
Instead, you wait until it actually is called and throw an 
AbstractMethodError.

> Cheers,
> Rob

tim




More information about the kaffe mailing list