Integrated: Fix misuse of atomic flag

William Kemper wkemper at openjdk.java.net
Thu Sep 2 15:41:34 UTC 2021


On Wed, 1 Sep 2021 20:56:44 GMT, William Kemper <wkemper at openjdk.org> wrote:

> This change fixes an assert that GC isn't cancelled in the middle of a safepoint. The assert was triggered during the tier2 test: `TestJNIGlobalRefs`. The test uses the _aggressive_ heuristic which runs GC's back to back. The atomic `_preemption_allowed` variable was being misused in a non-atomic way which could lead to the regulator thread cancelling GC after the control thread has gone to the final mark safepoint.

This pull request has now been integrated.

Changeset: f01e568c
Author:    William Kemper <wkemper at openjdk.org>
URL:       https://git.openjdk.java.net/shenandoah/commit/f01e568c5ba92bdd2ac023fe73c16bd714db8e04
Stats:     13 lines in 2 files changed: 9 ins; 0 del; 4 mod

Fix misuse of atomic flag

Reviewed-by: zgu, shade

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

PR: https://git.openjdk.java.net/shenandoah/pull/63


More information about the shenandoah-dev mailing list