[jboss-jira] [JBoss JIRA] (JASSIST-225) VerifyError: Bad type on operand stack is thrown in Java 8 when calling a particular method.

Karthik Abram (JIRA) issues at jboss.org
Fri Jun 13 09:08:39 EDT 2014


Karthik Abram created JASSIST-225:
-------------------------------------

             Summary: VerifyError: Bad type on operand stack is thrown in Java 8 when calling a particular method.
                 Key: JASSIST-225
                 URL: https://issues.jboss.org/browse/JASSIST-225
             Project: Javassist
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 3.18.2-GA
         Environment: Java SE 1.8.0_05 64-bit
            Reporter: Karthik Abram
            Assignee: Shigeru Chiba


Please see attached Eclipse project. In the JavassistErrorDemo.java if you run the program with line 64 uncommented, it works. However, including line 64 causes the program to fail with the following stack trace:

Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    com/javassist/test/Student$CopyExtractor.getValueList(Ljava/lang/Object;)Ljava/lang/String; @58: invokevirtual
  Reason:
    Type 'java/lang/Object' (current frame, stack[0]) is not assignable to 'com/javassist/test/GradeConverter'
  Current Frame:
    bci: @58
    flags: { }
    locals: { 'com/javassist/test/Student$CopyExtractor', 'java/lang/Object', 'java/lang/StringBuilder', 'com/javassist/test/Student', 'java/lang/Object' }
    stack: { 'java/lang/Object', 'com/javassist/test/Grade' }
  Bytecode:
    0000000: bb00 0c59 b700 104d 2bc0 0012 4e2c 2db6
    0000010: 0016 b600 1a57 2c12 1cb6 001a 572c 2db6
    0000020: 0020 b600 2357 2c12 1cb6 001a 5712 25b6
    0000030: 002b 3a04 1904 2db6 002f b600 3357 2c2d
    0000040: b600 2fb6 0036 572c b600 39b0 3a05 bb00
    0000050: 3d59 1905 b700 40bf                    
  Exception Handler Table:
    bci [0, 76] => handler: 76
  Stackmap Table:
    same_locals_1_stack_item_extended(@76,Object[#59])

	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2658)
	at java.lang.Class.getConstructor0(Class.java:2964)
	at java.lang.Class.newInstance(Class.java:403)
	at com.javassist.test.JavassistErrorDemo.makeClass(JavassistErrorDemo.java:83)
	at com.javassist.test.JavassistErrorDemo.main(JavassistErrorDemo.java:37)




--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the jboss-jira mailing list