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

Old Soot throws ParserException on Jimple files generated in legacy mode (version 1.0.0) #622

Open
cgobel opened this issue Jun 9, 2023 · 6 comments

Comments

@cgobel
Copy link

cgobel commented Jun 9, 2023

I have problems with the old soot parsing generated Jimple files from SootUp. Even with Legacy mode I got ParserExceptions. For example, there are problems with methods that are named after keywords and quoted with double quotes. Is there a workaround for that or do I have to use old soot for everything in my case?

I ran into this exception when I translated an Android app with SootUp to Jimple.

@swissiety
Copy link
Collaborator

Duplicate of #452

@swissiety swissiety marked this as a duplicate of #452 Jun 15, 2023
@stschott
Copy link
Collaborator

stschott commented Jun 19, 2023

Can you post an example of such a quoted keyword that causes the exception?

@cgobel
Copy link
Author

cgobel commented Jun 19, 2023

In line 11, character 81 causes the problem. The function is called "from" but old Soot expects the name to be escaped with single quotes.
com.google.android.material.transformation.ExpandableBehavior.jimple.txt

@swissiety
Copy link
Collaborator

swissiety commented Jul 15, 2023

Hi @cgobel,
I just added the functionality to escape ClassTypes like good old soot did. You can check it out with the 'fixLegacyJimplePrinter' branch.

Markus

@imcsq
Copy link

imcsq commented Dec 30, 2023

Will the updated feature be merged to the latest develop progress and released soon? Many features in the jimple files generated with sootup (latest develop version so far) cannot be handled by the soot jimpler parser, e.g., the [SUPER] class modifier and [varargs] method modifier. Sometimes I also get the error "No method source set for method <...mymethod...>" and "java.lang.RuntimeException: This operation requires resolving level SIGNATURES but (memethod) is at resolving level HIERARCHY".
Besides, I see a task in your todo list to support outputting the class file. IMO, generating the binaries is wanted in order to realize the usefulness of body interceptors & class mutation. Will this be done soon? If so, then it may be less urgent to support the legacy jimple parser.
Thanks! @swissiety

@swissiety
Copy link
Collaborator

There is still work to do in the associated PR. I would be happy if it finds it way into the next release.

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

No branches or pull requests

4 participants