RFR: 8376287: Crash in G1CMTask::start_partial_array_processing(oop) when using invalid value for -XX:ObjArrayMarkingStride

Guanqiang Han ghan at openjdk.org
Thu Jan 29 03:52:40 UTC 2026


Please review this change, it addresses a trivial issue. Thanks!

**Description:**

This is a trivial issue caused by the invalid value of -XX:ObjArrayMarkingStride=0, which results in a division by zero in the PartialArrayTaskStepper::start() method.
https://github.com/openjdk/jdk/blob/2529e2fe8dfe9685033bb0ae558266b8bc3cf95c/src/hotspot/share/gc/shared/partialArrayTaskStepper.inline.hpp#L39-L40

**Fix:**

Restrict the ObjArrayMarkingStride to positive values.

**Test:**

GHA

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

Commit messages:
 - fix 8376287

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

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


More information about the hotspot-gc-dev mailing list