Integrated: 8295214: Generational ZGC: Guard nmethods from cross modifying code

Erik Österlund eosterlund at openjdk.org
Fri Nov 11 14:39:21 UTC 2022


On Tue, 8 Nov 2022 16:19:47 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

> Generational ZGC will need to patch nmethod instructions outside of safepoints, and guard entries into the nmethods with cross modifying code fences. This is mostly taken care of by nmethod entry barrier code. But there are a few entries that don't go through nmethod entry barriers that need fixing. In particular when entering an nmethod by returning through the stack watermark barrier. This patch ensures that whenever the stack watermark barrier exposes a new nmethod, we also ensure that a cross modify fence is executed, so that any concurrently updated instructions can be safely executed.

This pull request has now been integrated.

Changeset: e7c2a8e6
Author:    Erik Österlund <eosterlund at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e7c2a8e60e35da0919119e919ed162217049e89f
Stats:     25 lines in 3 files changed: 20 ins; 5 del; 0 mod

8295214: Generational ZGC: Guard nmethods from cross modifying code

Reviewed-by: dholmes, rehn

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

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


More information about the hotspot-dev mailing list