[jboss-jira] [JBoss JIRA] (JASSIST-273) `Inconsistent stackmap frames` issue while instrumenting Kotlin anonymous class
Serkan Özal (Jira)
issues at jboss.org
Tue Aug 27 02:50:00 EDT 2019
[ https://issues.jboss.org/browse/JASSIST-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13775540#comment-13775540 ]
Serkan Özal commented on JASSIST-273:
-------------------------------------
I have added all the class files which you can find here: https://github.com/serkan-ozal/javassist-issue-report/tree/master/target/classes/ozal/serkan/javassist/issue/report
> `Inconsistent stackmap frames` issue while instrumenting Kotlin anonymous class
> -------------------------------------------------------------------------------
>
> Key: JASSIST-273
> URL: https://issues.jboss.org/browse/JASSIST-273
> Project: Javassist
> Issue Type: Bug
> Reporter: Serkan Özal
> Assignee: Shigeru Chiba
> Priority: Major
>
> https://github.com/serkan-ozal/javassist-issue-report/blob/master/src/main/java/ozal/serkan/javassist/issue/report/RunnerInstrumentation.java reproduces the following issue with version {{3.25.0-GA}}:
> {code:java}
> Exception in thread "main" java.lang.VerifyError: Inconsistent stackmap frames at branch target 170
> Exception Details:
> Location:
> ozal/serkan/javassist/issue/report/Runner$run$result$1.invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; @98: goto
> Reason:
> Current frame's stack size doesn't match stackmap.
> Current Frame:
> bci: @98
> flags: { }
> locals: { 'ozal/serkan/javassist/issue/report/Runner$run$result$1', 'java/lang/Object', 'kotlinx/coroutines/CoroutineScope', top, top, 'java/lang/Object' }
> stack: { 'java/lang/Object', 'java/lang/Object' }
> Stackmap Frame:
> bci: @170
> flags: { }
> locals: { 'ozal/serkan/javassist/issue/report/Runner$run$result$1', 'java/lang/Object', top, top, top, 'java/lang/Object' }
> stack: { 'java/lang/Object' }
> Bytecode:
> 0x0000000: b200 b812 bab6 0062 b800 203a 052a b400
> 0x0000010: 24aa 0000 0000 008f 0000 0000 0000 0001
> 0x0000020: 0000 0017 0000 0054 2b59 c100 2699 000a
> 0x0000030: c000 26b4 002a bf57 2ab4 002c 4d00 b200
> 0x0000040: 320a b600 36bb 0038 592a 01b7 003c c000
> 0x0000050: 072a 2a04 b500 24b8 0042 5919 05a6 0019
> 0x0000060: 1905 a700 482b 59c1 0026 9900 0ac0 0026
> 0x0000070: b400 2abf 572b c000 444e a700 223a 04b2
> 0x0000080: 004a bb00 4c59 b700 4f12 51b6 0055 1904
> 0x0000090: b600 58b6 005c b600 6212 644e 2da7 000d
> 0x00000a0: bb00 6659 1268 b700 6abf 3a07 b200 b812
> 0x00000b0: bcb6 0062 1907 b0
> Exception Handler Table:
> bci [61, 90] => handler: 125
> bci [101, 122] => handler: 125
> Stackmap Table:
> full_frame(@40,{Object[#2],Object[#113],Top,Top,Top,Object[#113]},{})
> same_locals_1_stack_item_frame(@55,Object[#113])
> same_frame(@101)
> same_locals_1_stack_item_frame(@116,Object[#113])
> full_frame(@118,{Object[#2],Object[#113],Top,Top,Top,Object[#113]},{Object[#113]})
> same_locals_1_stack_item_frame(@125,Object[#26])
> full_frame(@156,{Object[#2],Object[#113],Top,Object[#68],Top,Object[#113]},{})
> full_frame(@160,{Object[#2],Object[#113],Top,Top,Top,Object[#113]},{})
> full_frame(@170,{Object[#2],Object[#113],Top,Top,Top,Object[#113]},{Object[#113]})
> at ozal.serkan.javassist.issue.report.Runner.run(Runner.kt:19)
> at ozal.serkan.javassist.issue.report.RunnerInstrumentation.main(RunnerInstrumentation.java:35)
> {code}
> The problem is that while instrumenting {{ozal.serkan.javassist.issue.report.Runner$run$result$1}} anonymous Kotlin class, the stackmap inconsistency raises.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list