over-eager verification
Andrew Haley
aph@cambridge.redhat.com
Wed Mar 6 06:09:00 GMT 2002
Per Bothner writes:
> Tom Tromey wrote:
> >>>>>>"Per" == Per Bothner <per@bothner.com> writes:
> >
> > Per> We should verify a method the first time it is invoked, not when
> > Per> its class is prepared, since since most methods will never get
> > Per> called.
> >
> > I don't think we can do this. See JVM Spec Section 4.9.1, Pass 3:
> >
> > Still during linking, the verifier checks the code array of the
> > Code attribute for each method of the class file by performing
> > data-flow analysis on each method.
> >
> > So it explicitly requires checking during preparation and not at
> > invocation.
>
> Who cares? It's just a book. I know the guy who wrote it ...
>
> We have to look at the big picture: Making sure that invalid code
> does not violate the Virtual Machine constraints is the big picture.
Sure, but a Java program might need to prompt an operator immediately
when an invalid class is loaded rather than a few weeks later in the
middle of the night when the operator is asleep.
Andrew.
More information about the Java
mailing list