[jboss-jira] [JBoss JIRA] Closed: (JASSIST-60) VerifyError : Bad access to protected data
Shigeru Chiba (JIRA)
jira-events at lists.jboss.org
Mon May 5 22:39:20 EDT 2008
[ http://jira.jboss.com/jira/browse/JASSIST-60?page=all ]
Shigeru Chiba closed JASSIST-60.
--------------------------------
> VerifyError : Bad access to protected data
> ------------------------------------------
>
> Key: JASSIST-60
> URL: http://jira.jboss.com/jira/browse/JASSIST-60
> Project: Javassist
> Issue Type: Bug
> Environment: Javassist 3.7.1 (latest from cvs HEAD)
> Eclipse Version: 3.3.1.1, Build id: M20071023-1652 running in the JRE included with JDK1.6.0_03 on winXP and compiler compliance set to 5.0.
> Reporter: Yanic Inghelbrecht
> Assigned To: Shigeru Chiba
> Attachments: test_protected_and_bad_access.zip
>
>
> While running some javassist instrumentation on JHotDraw, I ran into the issue described below
> The code (attached in the follow-up post) is the simplest testcase I could find and causes the following exception when executed :
> Exception in thread "main" java.lang.VerifyError: (class: test_protected_and_bad_access/Client, method: doit signature: (Ltest_protected_and_bad_access/Circle;)V) Bad access to protected data
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
> at java.lang.Class.getConstructor0(Unknown Source)
> at java.lang.Class.newInstance0(Unknown Source)
> at java.lang.Class.newInstance(Unknown Source)
> at test_protected_and_bad_access.Main.main(Main.java:31)
> The testcase uses clone() to demonstrate the bug.
> Some things I've noticed that when the formal parameter of Client#doit(Circle) is changed from Circle to Figure, the error disappears (i.e. the two interface levels seem to matter).
> In the JHotDraw setup, adding a "public Object clone();" to the Circle interface is a work-around for this bug, although it doesn't seem to work in the attached testcase : when I add it, it results in a NoSuchMethodError for client#doit(Circle) when javassist loads the Client class (which is very trange since that class was not touched). If the same modification is made but the class is loaded with "regular reflection", the method is found alright, so perhaps this is a javassist bug as well?
> Thanks in advance for a quick response.
> Best regards,
> Yanic
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list