[kaffe] verifier and threads
gonzo
Robert.N.Gonzalez at williams.edu
Mon Jan 20 08:34:01 PST 2003
Hi Helmar,
thanks for the thread information. it turned out to be one of those
late-night bugs...the output of the verify3 was being cut off half way
when the program ran, but the execution of verify3 had finished (ie - it
just wasn't able to print all the info before the program completed
running). silly on my part :)
> > 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().
>
> Can't reproduce this one. If my verify3 () looks like this:
> ===========8<===========================
> bool
> verify3(Hjava_lang_Class* class, errorInfo *einfo)
> {
> postExceptionMessage (einfo, JAVA_LANG(VerifyError), "test, test");
> return false;
> ...
> }
> ===========>8===========================
>
> I get
> ===========8<===========================
> Couldn't find or load essential class `java/lang/Object' java.lang.VerifyError test, test
> ===========>8===========================
> when trying to load a class.
running on a HelloWorld program i get the error. in verify3, add this
code at the top of the method body (you may need to include string.h in
the file).
// speeds initial loading up by skipping verification of class
// libraries (temporary solution)
if (class->loader == 0 &&
(!strncmp("kaffe/", class->name->data, 6) ||
!strncmp("java/", class->name->data, 5)))
{
return(true);
}
postExceptionMessage(einfo, JAVA_LANG(VerifyError), "testing");
return (false);
this yields,
java.lang.ClassNotFoundException: testing
at java.lang.Throwable.fillInStackTrace(Throwable.java:native)
at java.lang.Throwable.<init>(Throwable.java:38)
at java.lang.Throwable.<init>(Throwable.java:48)
at java.lang.Exception.<init>(Exception.java:34)
at
java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:97)
at
java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:84)
at java.lang.Class.forName(Class.java:93)
at java.lang.Class.forName(Class.java:42)
cheers,
~rob
More information about the kaffe
mailing list