pascal-lab / Tai-e

An easy-to-learn/use static analysis framework for Java
https://tai-e.pascal-lab.net/docs/index.html
GNU Lesser General Public License v3.0
1.45k stars 175 forks source link

Could Tai-e or Soot frontend support bytecode from jdk21 #120

Closed hillwangsec closed 1 month ago

hillwangsec commented 1 month ago

๐Ÿ“ Overall Description

When the input -acp parameter path is the .class bytecode generated from jdk21 compilation. Tai-e could not work and always output the exception: java.lang.IllegalArgumentException: Unsupported class file major version 65.

And from Tai-e document, shown that: Currently, Tai-e leverages Soot frontend to parse Java programs and help build Tai-eโ€™s IR. Soot contains two frontends, one for parsing Java source files (.java) and the other one for bytecode files (.class). The former is outdated (only partially supports Java versions up to 7); while the latter, though quite robust (works properly for the .class files compiled by up to Java 17), cannot fully satisfy our requirements.

So, here would like to check that if now the Tai-e analysis framework is still unable to support the projects compiled by jdk21. thanks๏ผ

๐ŸŽฏ Expected Behavior

Support to analyze the jdk21 .class bytecode by Tai-e framework.

๐Ÿ› Current Behavior

Exception in thread "main" java.lang.IllegalArgumentException: Unsupported class file major version 65

Exception occurred in the source code:

private static void runSoot(String[] args) {
        try {
            soot.Main.v().run(args);
        } catch ...

๐Ÿ”„ Reproducible Example

Any classes produced by jdk21 compilation.

โš™๏ธ Tai-e Arguments

๐Ÿ” Click here to see Tai-e Options ```yaml {{The content of 'output/options.yml' file}} ```
๐Ÿ” Click here to see Tai-e Analysis Plan ```yaml {{The content of 'output/tai-e-plan.yml' file}} ```

๐Ÿ“œ Tai-e Log

๐Ÿ” Click here to see Tai-e Log ``` {{The content of 'output/tai-e.log' file}} ```

โ„น๏ธ Additional Information

Have any idea or suggestion now to support jdk21 byte code?

zhangt2333 commented 1 month ago

Our new front-end have supported Java 21, but the release is still pending as there are some remaining tasks to complete. We appreciate your patience in the meantime. ๐Ÿ˜Š

hillwangsec commented 1 month ago

Sure & Thanks for attention~ And the released frond-end in Tai-e now based on Soot is packaged to lib/sootclasses-modified.jar. we see that the latest Soot now has support JDK21, so is it convenient to share the source code of sootclasses-modified.jar? Maybe we can also try to upgrade it at the same time.

best wishes!

zhangt2333 commented 1 month ago

Here is the file for you: sootclasses-modified.zip.

hillwangsec commented 1 month ago

Thanks a lot๏ผ