-
Notifications
You must be signed in to change notification settings - Fork 62
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
Experimental support for loading JIMAGE (JDK 9+) files #1046
Conversation
d4189fd
to
86f648b
Compare
I've rebased this on top of #1005, so the diff is slightly more amenable to reviewing than it was before. I'm still relying on a hack (copy-pasting the entire definition of |
decacf0
to
119b4b6
Compare
I've rebased this on top of GaloisInc/crucible@e1531a0, and I have updated the documentation to make it clear that support for JDK 9+ is experimental. This is now ready for review. I briefly considered if |
This bumps the `crucible` submodule to include GaloisInc/crucible#638, which adds basic support for handling JDK 9 or later. JDK 9+ packages its standard library not in a JAR file, but in a JIMAGE file. For more details on how `crucible-jvm` handles JIMAGE files, refer to `Note [Loading classes from JIMAGE files]` in `Lang.JVM.Codebase`. This fixes #861, although there are still unsolved issues that arise when using modern JDKs with certain classes, such as `String`. As a result, I have decided to label support for JDK 9+ as experimental: * I have updated the SAW documentation to mention these shortcomings. * I have opened GaloisInc/crucible#641 to track the remaining issues. Other things: * GaloisInc/crucible#636 and GaloisInc/crucible#638 upstreamed the code from `SAWScript.JavaTools` and `SAWScript.ProcessUtils` into `crucible-jvm`, so we can remove these modules in favor of importing `Lang.JVM.JavaTools` and `Lang.JVM.ProcessUtils` from `crucible-jvm`. * I removed the dependency on the `xdg-basedir`, as it was unused. This dependency was likely added quite some time ago, and it appears that `saw-script` switched over to using XDG-related functionality from the `directory` library since then. I opted to use `directory` to find the `.cache` directory as well, so I have made that clear in the `.cabal` file. * The `biJavaCodebase :: Codebase` field of `BuiltinContext` is completely unused, which I noticed when making changes to the `Codebase` type. Let's just remove it.
119b4b6
to
1e749e0
Compare
This bumps the
crucible
submodule to include GaloisInc/crucible#638, which adds basic support for handling JDK 9 or later. JDK 9+ packages its standard library not in a JAR file, but in a JIMAGE file. For more details on howcrucible-jvm
handles JIMAGE files, refer toNote [Loading classes from JIMAGE files]
inLang.JVM.Codebase
.This fixes #861, although there are still unsolved issues that arise when using modern JDKs with certain classes, such as
String
. As a result, I have decided to label support for JDK 9+ as experimental:Other things:
crucible-jvm: Add --java-bin-dirs crucible#636 and Lang.JVM.Codebase: experimental support for loading JIMAGE files crucible#638 upstreamed the code from
SAWScript.JavaTools
andSAWScript.ProcessUtils
intocrucible-jvm
, so we can remove these modules in favor of importingLang.JVM.JavaTools
andLang.JVM.ProcessUtils
fromcrucible-jvm
.I removed the dependency on the
xdg-basedir
, as it was unused. This dependency was likely added quite some time ago, and it appears thatsaw-script
switched over to using XDG-related functionality from thedirectory
library since then. I opted to usedirectory
to find the.cache
directory as well, so I have made that clear in the.cabal
file.The
biJavaCodebase :: Codebase
field ofBuiltinContext
is completely unused, which I noticed when making changes to theCodebase
type. Let's just remove it.