Skip to content
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

reproduce bug in sbt/sbt-assembly/issues/475 #45

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

MasseGuillaume
Copy link

I'm still investigating, but I was able to reproduce the root cause

on the issue tracker asm ask if javap works fine on the class
it does, I was able to unzip calicte and run java -p on
SqlFunctions.class

I'm trying to understand if it's an asm bug, or we do something in
jarjar to corrupt the bytecode
@MasseGuillaume
Copy link
Author

I was about to submit a bug to asm https://gitlab.ow2.org/asm/asm

with this reproduction
https://github.com/MasseGuillaume/asm-remapper-bug

Then I added a CheckClassAdapter like suggested in the issue templated and it revealed something interesting:

❯ gradle test
RemapperTest > remapper() FAILED
    java.lang.IllegalArgumentException: Invalid end label (must be visited first)
        at org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453)
        at org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996)
        at org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757)
        at org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257)
        at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614)
        at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515)
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:745)
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:425)
        at remapper.bug.RemapperTest.remapper(RemapperTest.java:42)

I'm trying to understand what's the problem.

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.

1 participant