RFR: 8373695: G1: Using a value near integer max for ActiveProcessorCount causes fatal crash [v2]

Stefan Karlsson stefank at openjdk.org
Fri Dec 19 14:28:17 UTC 2025


On Fri, 19 Dec 2025 13:47:36 GMT, Jonas Norlinder <jnorlinder at openjdk.org> wrote:

> Did you mean this?
> 
> ```
>   product(uint, ParallelGCThreads, 0,                                       \
>           "Number of parallel threads parallel gc will use")                \
>           range(0, (max_jint-1)/wordSize)                                   \
> ```

Yes.


> I don't think that will not solve this bug when `ParallelGCThreads` is heuristically determined and may (i.e. it is defined) depend on ActiveProcessorCount. Applying the above patch and running with `java -XX:+UseG1GC -XX:ActiveProcessorCount=2147483647` results in a fatal crash on my machine. That being said, it do solve the fatal crash that can be triggered with `java -XX:+UseG1GC -XX:ParallelGCThreads=2147483646`.

My comment was made in the context provided before you found that issue.

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

PR Comment: https://git.openjdk.org/jdk/pull/28831#issuecomment-3675266942


More information about the hotspot-gc-dev mailing list