RFR: 8372685: C2 SuperWord: wrong requires in test after JDK-8371146

Emanuel Peter epeter at openjdk.org
Thu Nov 27 14:09:00 UTC 2025


@MBaesken Reported this issue on windows:

TestAliasingCheckPreLimitNotAvailable_all-flags-fixed-stress-seed.jtr and TestAliasingCheckPreLimitNotAvailable_all-flags-no-stress-seed.jtr show failures on WIndows :

[0.095s][error][gc] Failed to lookup symbol: VirtualAlloc2
Error occurred during initialization of VM
ZGC requires Windows version 1803 or later

AIX fails too :
Error occurred during initialization of VM
Option -XX:+UseZGC not supported


I learned a small lesson here: `@requires vm.gc.Z` is much smarter than checking that no other GC is set, or ZGC is set. It also checks if ZGC is available, which is not always the case, e.g. on the reported Windows machne.

@MBaesken Can you please confirm that this fixes the test for you?

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

Commit messages:
 - JDK-8372685

Changes: https://git.openjdk.org/jdk/pull/28537/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28537&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8372685
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/28537.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28537/head:pull/28537

PR: https://git.openjdk.org/jdk/pull/28537


More information about the hotspot-compiler-dev mailing list