New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StackMapTable rewriting produce invalid map when input has extended frames with an offset below 64 #350
Comments
This issue has happened to us a few times with kotlin classes. Most of the times it got fixed with the new insertAfter overload with the boolean set to CtClass.isKotlin() |
sgjesse
added a commit
to sgjesse/javassist
that referenced
this issue
Dec 14, 2020
chibash
added a commit
that referenced
this issue
Apr 25, 2021
This fixes Issue #350. Check for extended frame type when updating StackMapTable offset.
chibash
added a commit
that referenced
this issue
Apr 25, 2021
odl-github
pushed a commit
to opendaylight/odlparent
that referenced
this issue
Jan 7, 2022
jboss-javassist/javassist#305 jboss-javassist/javassist#328 jboss-javassist/javassist#339 jboss-javassist/javassist#350 jboss-javassist/javassist#357 jboss-javassist/javassist#363 Change-Id: I29963013cf637731fe1064425b9d2e80d63bd9d3 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
odl-github
pushed a commit
to opendaylight/odlparent
that referenced
this issue
Jan 7, 2022
jboss-javassist/javassist#305 jboss-javassist/javassist#328 jboss-javassist/javassist#339 jboss-javassist/javassist#350 jboss-javassist/javassist#357 jboss-javassist/javassist#363 Change-Id: I29963013cf637731fe1064425b9d2e80d63bd9d3 Signed-off-by: Robert Varga <robert.varga@pantheon.tech> (cherry picked from commit 0df0ba3)
odl-github
pushed a commit
to opendaylight/odlparent
that referenced
this issue
Jan 7, 2022
jboss-javassist/javassist#305 jboss-javassist/javassist#328 jboss-javassist/javassist#339 jboss-javassist/javassist#350 jboss-javassist/javassist#357 jboss-javassist/javassist#363 Change-Id: I29963013cf637731fe1064425b9d2e80d63bd9d3 Signed-off-by: Robert Varga <robert.varga@pantheon.tech> (cherry picked from commit 0df0ba3)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran into this issue with the following
StackMapTable
on input:When inserting a gap in the second frame, changing the offset from 63 to 65, the frame is incorrectly rewritten, and the following
StackMapTable
is produced:I think the issue lies here, where it is not taken into account that the existing encoding could already have been the extended one even with an offset below 64. As far as I can see this could happen for frame types
247
and251
.javap
will correctly disassemble the inputStackMapTable
, including the following frameThe input is produced by ASM 9.0, and for building the
StackMapTable
theMethodVisitor.visitFrame
is used withF_NEW
for all frames.The text was updated successfully, but these errors were encountered: