Skip to content

Conversation

@jbachorik
Copy link
Collaborator

@jbachorik jbachorik commented Jul 12, 2022

This is a fix to handle the switch statements properly in regards of stack map frames.

Fixes #549

TL;DR
The switch statements are basically jump statements and as such they should store the state (stack + local vars) for all the target labels so the state can be restored once the label is visited.

Unfortunately, I am not able to hand-craft a valid Java source code which would simulate the bytecode generated in CGLIB proxies (that's where the issue was reported originally) and until the test harness is extended to allow testing class transformations on an arbitrary bytecode (eg. not depending on javac output) this particular fix will not have an accompanying test.

@jbachorik jbachorik added this to the 2.3.0 milestone Jul 12, 2022
@jbachorik jbachorik merged commit a07ed53 into develop Jul 12, 2022
@jbachorik jbachorik deleted the jb/fix_smf_switch branch July 12, 2022 20:18
@jbachorik jbachorik modified the milestones: 2.3.0, 2.2.3 Nov 10, 2022
@jbachorik jbachorik modified the milestones: 2.3.0, 2.2.3 Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When using btrace to log return value breaks the java application

2 participants