RFR: 8350982: -server|-client causes fatal exception on static JDK [v2]

Ioi Lam iklam at openjdk.org
Thu Mar 6 20:37:55 UTC 2025


On Thu, 6 Mar 2025 17:55:28 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:

>> Would it be better to use @requires !jdk.static for now so this test isn't selected when testing static builds? There is work further down the line to figure out a story for static builds + AOT as the ultimate goal is to run jlink and produce a single executable so there wouldn't be a separate AOT cache/archive on the file system. It's much further down the road, not clear that it's worth trying to test intermediate tests with -Xshare:auto at this time.
>
> Looking back at the history, the `-Xshare:auto` & `-server` issue (https://bugs.openjdk.org/browse/JDK-8005933) was related to this code in JDK 8:
> 
> https://github.com/openjdk/jdk8u-dev/commit/a1f3a95880318c32169ff89dc8784a0dfc629eec
> 
> In JDK 8, on c2 sharedSpaces is disabled if the following condition is true.
> 
> 
> !DumpSharedSpaces && !RequireSharedSpaces &&
>       (FLAG_IS_DEFAULT(UseSharedSpaces) || !UseSharedSpaces)
> 
> 
> That code no longer exists in mainline. The `-server` option has become a no-op. The launcher code, `CheckJvmType` removes `-server` from the command line arguments passed to the VM side. As a result of those, `-server` is no real impact on CDS now.

For this particular test, I think it's OK to remove `-server` (so it won't fail with static JDK) and ` * @bug 8005933`  (as the condition related to that particular bug no longer exists). But we should keep the test for the purpose "-Xshare:auto is the default when -Xshare is not specified"

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23881#discussion_r1984015402


More information about the hotspot-compiler-dev mailing list