Integrated: 8334545: runtime/ClassInitErrors/TestStackOverflowDuringInit.java fails after JDK-8294960
David Holmes
dholmes at openjdk.org
Wed Jul 3 21:44:23 UTC 2024
On Wed, 26 Jun 2024 05:56:22 GMT, David Holmes <dholmes at openjdk.org> wrote:
> When the test is now run under jtreg, hundreds of other classes are initialized before we trigger the initial `StackOverflowError` - including the critical `java/lang/Long$LongCache` class. This evades the failure scenario that the test was so carefully setting up and so the test fails.
>
> We can restore the failure scenario if we use custom classes to replace `Long` and `LongCache`. This has the added advantage that the test now seems to work reliably on all mainstream platforms.
>
> The test runs with a small -Xss value based on the minimum value allowed on any of macos/linux/windows x64, and macos/linux aarch64. It is possible other platforms - PPC, S390 - may not support that value. I don't know of a way to programmatically find the minimum for the current platform at runtime.
>
> Testing:
> - test was run 10x on each mainline platform in release and debug builds.
> - logging was used (`-Xlog:exceptions=info,class+init=info` with vm.flagless removed) to check that the SOE was triggering where expected and the NCDFE is thrown.
>
> Thanks.
This pull request has now been integrated.
Changeset: 587535c5
Author: David Holmes <dholmes at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/587535c5b9bb258836b47c3a8c41ffb91bbfc131
Stats: 42 lines in 2 files changed: 30 ins; 4 del; 8 mod
8334545: runtime/ClassInitErrors/TestStackOverflowDuringInit.java fails after JDK-8294960
Reviewed-by: iklam, stuefe
-------------
PR: https://git.openjdk.org/jdk/pull/19894
More information about the hotspot-runtime-dev
mailing list