[kaffe] verifier and threads

gonzo Robert.N.Gonzalez at williams.edu
Sun Jan 19 23:13:01 PST 2003


hey all :)  i've got two kinda interesting bugs today.


i've started testing my verifier on larger programs.  the verifier is
simply implementations of verify2 and verify3 in verify.c.  these methods
are called from processClass in classMethod.c (all files i modify are in
kaffe/kaffevm).

in the process of linking a class, which involves calls to verify2 and
verify3, execution can begin on methods in the class, including unverified
methods.  this is particularly weird since at the beginning of verify3 i
call jthread_disable_stop() which, unless i am mistaken, should not allow
other code to be run until it calls jthread_enable_stop().  that is, with
debugging enabled in my verifier i get half of verify3's output before the
execution of a small main() method starts and ends.

this is kinda weird for two reasons.  first, no method in a class should
be executed until the class is linked.  second, if jthread_disable_stop()
is doing its job a method's code certainly should not executed in the
middle of verifying it.

can any kaffe thread or class loader experts explain this behavior to me?


my other bug is also weird.  in Verify3, if you:
	postExceptionMessage(einfo, JAVA_LANG(VerifyError), MSG);
when the error's thrown it yields a ClassNotFoundException and not a
VerifyError (though MSG is retained).  however, ClassFormatError is found
easily.  i can't seem to figure out why this is.

to reproduce this, simply post a VerifyError in verify2() or verify3().



cheers,
~rob





More information about the kaffe mailing list