[jboss-jira] [JBoss JIRA] Commented: (JBAOP-660) VerifyError on Illegal bytecode generated with cross-package inheritence
Kabir Khan (JIRA)
jira-events at lists.jboss.org
Tue Oct 7 04:52:20 EDT 2008
[ https://jira.jboss.org/jira/browse/JBAOP-660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12432842#action_12432842 ]
Kabir Khan commented on JBAOP-660:
----------------------------------
Jason,
I have tried to reproduce this with a test, but it passes for me. Can you please readjust the test to make it fail as described?
We've been mavenised, to build the project see http://wiki.jboss.org/wiki/BuildingJBossAOPFromSubversion
To build the tests you can do
$ ./build.sh -f build-tests-jdk50.xml
Then to run this test only
$ ./build.sh -f build-tests-jdk50.xml javaagent-ga-test -Dtest=inheritanceacrosspackages
> VerifyError on Illegal bytecode generated with cross-package inheritence
> ------------------------------------------------------------------------
>
> Key: JBAOP-660
> URL: https://jira.jboss.org/jira/browse/JBAOP-660
> Project: JBoss AOP
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 2.0.0.alpha1, 2.0.0.alpha2, 2.0.0.alpha3, 2.0.0.alpha4, 2.0.0.alpha5, 2.0.0.alpha6, 2.0.0.beta1, 2.0.0.beta2, 2.0.0.CR1, 2.0.0.CR2, 2.0.0.CR3, 2.0.0.CR4, 2.0.0.CR5, 2.0.0.CR6, 2.0.0.CR7, 2.0.0.CR8, 2.0.0.CR9, 2.0.0.CR10, 2.0.0.CR11, 2.0.0.CR12, 2.0.0.CR13, 2.0.0.CR14, 2.0.0.CR15, 2.0.0.CR16, 2.0.0.CR17, 2.0.0.CR18
> Reporter: Jason T. Greene
> Priority: Critical
> Fix For: 2.0.0.GA
>
>
> If two classes in an inheritance tree are both weaved, and the classes are in different packages, the generated adviser classes contain bytecode that violates the protected member access restrictions:
> 33: getfield #617; //Field two/Bar$BarInstanceAdvisor.parent:Ltwo/Bar$BarAdvisor;
> 36: getfield #619; //Field one/Foo$FooAdvisor.aop$FieldInfo_w_blah:Lorg/jboss/aop/FieldInfo;
> A protected member can only be accessed on an object instance that is the same type or a subtype of the code touching the protected field, unless both classes are in the same package, in which case normal package access rules supersede.
> Adding a method call indirection, or making the fields public would be possible solutions.
> To reproduce, just create two small classes in different packages where one inherits the other, and both are weaved. Then call Advised._getInstanceAdvisor(), which will attempt to load the class, resulting in a VerifyError
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list