Bytecode verifier

Tom Tromey tromey@redhat.com
Thu Apr 1 00:10:00 GMT 2004


>>>>> "Cedric" == Cedric Berger <cedric@berger.to> writes:

Cedric> I don't know how effective that would be, but that's pretty easy to
Cedric> create bad bytecode mechanically. For example, just just take correct
Cedric> bytecode, and then run it (uncompressed) through something like that
Cedric> (untested):

Nice idea.

Cedric> Then the resulting bugcode could be fed to both GCJ and Sun's
Cedric> verifier for comparaisons.

Unfortunately Sun's verifier and ours reject and accept different
code.  The deal is, "invalid bytecode" is not perfectly well defined.
Instead, there are restrictions in the JVM Spec which are basically
incoherent.  It doesn't look easy to write a verifier which behaves
the same as Sun's, particularly considering that theirs has changed
over time.

Tom



More information about the Java mailing list