You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Pavel Pervov (JIRA)" <ji...@apache.org> on 2007/07/25 16:12:31 UTC

[jira] Created: (HARMONY-4538) [drlvm][verifier][regression] Two tests on invokevirtual instruction started to fail after verifier switch.

[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


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.


Re: [jira] Commented: (HARMONY-4538) [drlvm][verifier][regression] Two tests on invokevirtual instruction started to fail after verifier switch.

Posted by Alexei Fedotov <al...@gmail.com>.
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 <ml...@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) <ji...@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

Re: [jira] Commented: (HARMONY-4538) [drlvm][verifier][regression] Two tests on invokevirtual instruction started to fail after verifier switch.

Posted by Mikhail Loenko <ml...@gmail.com>.
Thanks, Pavel and Alexei.

I agree since this is a sensitive area we better behave just like RI,
so I'll integrate this check to verifier.

Thanks,
Mikhail

2007/7/27, Pavel Pervov <pm...@gmail.com>:
> Mikhail,
>
> The spec reads (2.17.3 Linking): "VerifyError: The binary definition for a
> class or interface failed to pass a set of required checks to verify that it
> cannot violate the integrity if the Java virtual machine".
>
> Although I was unable to find any requirements in the specification, but
> RI consider the checks which are stressed by these tests to be "required
> checks to verify that it (binary definition) cannot violate the integrity".
>
> Verification of binary represenation have to occur before any code of a
> class is executed. So, this is required to be checked by verifier, although
> it may look totally unnatural.
>
> Thank you,
>    Pavel.
>
> On 7/27/07, Mikhail Loenko <ml...@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) <ji...@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.
> > >
> > >
> >
>
>
>
> --
> Pavel Pervov,
> Intel Enterprise Solutions Software Division
>

Re: [jira] Commented: (HARMONY-4538) [drlvm][verifier][regression] Two tests on invokevirtual instruction started to fail after verifier switch.

Posted by Pavel Pervov <pm...@gmail.com>.
Mikhail,

The spec reads (2.17.3 Linking): "VerifyError: The binary definition for a
class or interface failed to pass a set of required checks to verify that it
cannot violate the integrity if the Java virtual machine".

Although I was unable to find any requirements in the specification, but
RI consider the checks which are stressed by these tests to be "required
checks to verify that it (binary definition) cannot violate the integrity".

Verification of binary represenation have to occur before any code of a
class is executed. So, this is required to be checked by verifier, although
it may look totally unnatural.

Thank you,
    Pavel.

On 7/27/07, Mikhail Loenko <ml...@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) <ji...@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.
> >
> >
>



-- 
Pavel Pervov,
Intel Enterprise Solutions Software Division

Re: [jira] Commented: (HARMONY-4538) [drlvm][verifier][regression] Two tests on invokevirtual instruction started to fail after verifier switch.

Posted by Mikhail Loenko <ml...@gmail.com>.
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) <ji...@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.
>
>

[jira] Assigned: (HARMONY-4538) [drlvm][verifier][regression] Two tests on invokevirtual instruction started to fail after verifier switch.

Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Loenko reassigned HARMONY-4538:
---------------------------------------

    Assignee: Mikhail Loenko

> [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.


[jira] Closed: (HARMONY-4538) [drlvm][verifier][regression] Two tests on invokevirtual instruction started to fail after verifier switch.

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison closed HARMONY-4538.
--------------------------------


> [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.


[jira] Commented: (HARMONY-4538) [drlvm][verifier][regression] Two tests on invokevirtual instruction started to fail after verifier switch.

Posted by "Mikhail Loenko (JIRA)" <ji...@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.


[jira] Resolved: (HARMONY-4538) [drlvm][verifier][regression] Two tests on invokevirtual instruction started to fail after verifier switch.

Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Loenko resolved HARMONY-4538.
-------------------------------------

    Resolution: Fixed

fixed in r563013

> [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.