harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Fedotov" <alexei.fedo...@gmail.com>
Subject Re: [jira] Commented: (HARMONY-4538) [drlvm][verifier][regression] Two tests on invokevirtual instruction started to fail after verifier switch.
Date Fri, 27 Jul 2007 12:44:24 GMT
Mikhail,

Pavel (P), Pavel (R), me and Gregory has discussed this problem. We
agreed that both approaches make sense. Here are three reasons why it
is better to throw VerifyError during verification stage compared to
runtime check outlining the differences between VerifyError and
IllegalAccessError.

* Specification of VerifyError says that.
* VerifyError should be thrown before any bytecode of the method is
executed while IllegalAccessError is thrown when a problematic
instruction is executed.
* You may turn on/off IllegalAccessError in runtime using
SetAccessible reflection call, and this shouldn't be true for problems
that cause VerifyError.

If you are not convinced with this feel free to implement the behavior
as you like since the impact of the solution is not great.





On 7/27/07, Mikhail Loenko <mloenko@gmail.com> wrote:
> Though this bugs needs to be fixed, I have a feeling that verifer is not
> the right place for this check:
>
> It checks the following: if 'a' extends 'b' and 'b' has protected
> method (or field) 'm',
> and 'a' and 'b' have different packages then you can't call e.g.
> 'new b().m()' from a method of class 'a'
>
> If you try you should get VerifyError.
>
> old verifier has this check, I've implemented it in the new one as well,
> but i'm reluctant to integrate it since these access checks are not specific
> for verifier and all other access check are implemented in runtime
>
> For example if in the example above 'm' is package-access, then
> IllegalAccessError
> is thrown.
>
> I suggest that we don't fix verifier's behavior but instead move this
> check to a more
> natural place
>
> Thanks,
> Mikhail
>
>
> 2007/7/26, Mikhail Loenko (JIRA) <jira@apache.org>:
> >
> >    [ https://issues.apache.org/jira/browse/HARMONY-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12515613
]
> >
> > Mikhail Loenko commented on HARMONY-4538:
> > -----------------------------------------
> >
> > evaluation: this one should be fixed as well
> >
> > > [drlvm][verifier][regression] Two tests on invokevirtual instruction started
to fail after verifier switch.
> > > -----------------------------------------------------------------------------------------------------------
> > >
> > >                 Key: HARMONY-4538
> > >                 URL: https://issues.apache.org/jira/browse/HARMONY-4538
> > >             Project: Harmony
> > >          Issue Type: Bug
> > >          Components: DRLVM
> > >            Reporter: Pavel Pervov
> > >            Assignee: Mikhail Loenko
> > >
> > > The tests
> > > vm/jvms/instructions/invokeReturn/invokevirtual/invokevirtual13/invokevirtual1304/invokevirtual1304
and
> > > vm/jvms/instructions/invokeReturn/invokevirtual/invokevirtual13/invokevirtual1309/invokevirtual1309
> > > started to fail.
> > > Tests check that protected and private methods of superclass located in package
different from the class can't be called.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
>


-- 
With best regards,
Alexei,
ESSD, Intel

Mime
View raw message