On Dec 28, 10:49 pm, Peter Collingbourne <[email protected]> wrote:
> On Thu, Jul 31, 2008 at 02:01:08PM -0700, Rich Hickey wrote:
>
> > On Jul 31, 11:43 am, Stefan Ring <[email protected]> wrote:
> > > Thanks a lot. Your change makes the CACAO verifier happy but I think
> > > you should revert it.
>
> > > The instruction in question is actually invokeinterface, not
> > > invokevirtual. After reading the specification for invokeinterface
> > > (esp. "Runtime Exceptions"), I have the strong impression that clojure
> > > is right and CACAO is wrong.
>
> > Yes, invokeinterface, sorry.
>
> > Ok, I've backed it out.
>
> Although the current version of clojure does generate technically
> valid bytecode with respect to invokeinterface, I would like to
> recommend that it be modified to emit a checkcast.
>
> The ability of invokeinterface to accept a target of type Object is
> the result of a relaxation in the strictness of the verifier which was
> presumed to be necessary in certain special cases, as described further
> in [1]. The paper also explains why this relaxation is unnecessary,
> and proposes a stricter verifier.
>
> Even with the specification's (and hotspot's) less strict verifier,
> the use of invokeinterface without a checkcast means that runtime type
> errors in interface calls result in an IncompatibleClassChangeError
> rather than the more conventional ClassCastException, which may lead
> to confusion.
>
> Background: I am packaging clojure for Debian, which uses gij as its
> default JVM. gij uses the stricter verifier, and rejects clojure
> generated code with a stack trace similar to that shown in [2].
Ok, I've re-enabled the checkcasts before invokeInterface calls (svn
1187)
Rich
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---