harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Tromey <tro...@redhat.com>
Subject Re: [VM] Bytecode Subroutine Verification
Date Mon, 31 Jul 2006 22:23:35 GMT
>>>>> "Pavel" == Pavel Rebriy <pavel.rebriy@gmail.com> writes:

Pavel> There are several virtual machines in Harmony project and none
Pavel> of them provides subroutine verification for Java bytecode. I
Pavel> would like to discuss appropriate methodology of subroutine
Pavel> verification.

Pavel> The question is whether it is better to inline subroutines and
Pavel> then run a simpler data flow analysis, or to run directly a
Pavel> more complex data flow analysis.

It isn't clear to me that you can successfully determine the
boundaries of subroutines in a useful way.  I considered this for a
while in my implementation but gave up.  I didn't keep any of my
example code around though.

I recommend ignoring a good chunk of what the JVM Spec has to say
about verification.  It is simply wrong.

Instead, read the various papers by Alessandro Coglio on this topic.
In libgcj I basically implemented what he suggests.  This seems to
work well in practice... that is, it has caught compiler bugs and
other problems for us, and we haven't had major problems with the
verifier rejecting valid code.  (We did have these problems when we
tried to follow the JVM Spec.)

While you can construct bad cases that make Coglio-style verifiers
very slow, I'd be surprised if the verifier generally shows up high in
profiles.  (Our profiles tend to omit the verifier for other reasons,
but other per-class things like linking appear quite low.)


Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message