RFR: 8357563: Shenandoah headers leak un-prefixed defines
Stefan Karlsson
stefank at openjdk.org
Thu May 22 12:41:03 UTC 2025
We hit a compilation error in ZGC when we defined a constant NumPartitions. This happened because there is a define name NumPartitions inside shenandoahFreeSet.hpp. I propose that this (and its friends) are hid inside the ShenandoahRegionPartitions class, which is the only user of these defines. An alternative would be to prefix the define with something that is unlikely to clash with other parts of HotSpot.
This PR is my suggestion for a change to solve this so this name conflict. Does this seem like an acceptable solution, or do you want something else? Thanks!
-------------
Commit messages:
- 8357563: Shenandoah headers leak un-prefixed defines
Changes: https://git.openjdk.org/jdk/pull/25392/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25392&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8357563
Stats: 12 lines in 1 file changed: 6 ins; 6 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/25392.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25392/head:pull/25392
PR: https://git.openjdk.org/jdk/pull/25392
More information about the hotspot-gc-dev
mailing list