RFR: 8279437: [JVMCI] exception in HotSpotJVMCIRuntime.translate can exit the VM

Doug Simon dnsimon at openjdk.java.net
Tue Jan 4 10:10:36 UTC 2022


This PR addresses the problem reported in JDK-8279437 by adding support for transferring exceptions from HotSpot into libgraal (the other way around was already supported).
It also improves the translation of exceptions by:
* using a native (resource) buffer more directly for serializing an exception
* changing the serialization format to be a gzipped binary representation as it is much smaller than the string representation currently used and avoids having to worry about special characters (e.g. a `|` in an exception's message string).

It also adds the `jvmci.ForceTranslateFailure` option to allow testing handling of failures in `HotSpotJVMCIRuntime.translate`. See https://github.com/oracle/graal/commit/b3a6ce471e0d116196d6fde1c62377191f5db4ec for such a test.

-------------

Commit messages:
 - failure translating object between libjvm and libjvmci should not cause VM to exit

Changes: https://git.openjdk.java.net/jdk/pull/6951/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6951&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8279437
  Stats: 483 lines in 9 files changed: 359 ins; 32 del; 92 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6951.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6951/head:pull/6951

PR: https://git.openjdk.java.net/jdk/pull/6951


More information about the hotspot-compiler-dev mailing list