RFR: 8302795: Shared archive failed on old version class with jsr bytecode
David Holmes
dholmes at openjdk.org
Mon Feb 27 02:19:03 UTC 2023
On Fri, 24 Feb 2023 23:28:14 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
> Please review this simple fix for avoid writing in to CDS archive during runtime while loading a shared old class (major_version < 50) with methods containg the jsr byte code.
> Otherwise, JVM crashes with the following message in the hs err log:
> `Error accessing class data sharing archive. Mapped file inaccessible during execution, possible disk/network problem.`
>
> Passed tiers 1 - 4 testing.
Sorry I'm having a little trouble following the problem and solution here. The problem IIUC:
- If we load a class with JSR bytecodes then we have to rewrite those to avoid the use of JSR.
- If we dumped such a class into the shared archive it is in the RO part of the archive.
- If we attempt to rewrite a class in the RO section then we crash.
The solution would seem to be a choice of:
a) don't rewrite the class; or
b) don't archive it
The solution presented here seems to be (a) but I thought we had to rewrite classes with JSR bytecodes ???
-------------
PR: https://git.openjdk.org/jdk/pull/12752
More information about the hotspot-runtime-dev
mailing list