[jdk21u-dev] Integrated: 8331735: UpcallLinker::on_exit races with GC when copying frame anchor

Andrew John Hughes andrew at openjdk.org
Fri Feb 28 12:50:03 UTC 2025


On Thu, 20 Feb 2025 16:23:03 GMT, Andrew John Hughes <andrew at openjdk.org> wrote:

> Clean backport of a fix for a race condition in code adapted from `JavaCallWrapper` for the FFM API. This is more visible in 22 and later, where FFM is fully supported and the [OpenType implementation using HarfBuzz](https://bugs.openjdk.org/browse/JDK-8318364) has been ported to use it. However, the copy in the native state seems to have been introduced as far back as [JDK-8269240](https://bugs.openjdk.org/browse/JDK-8269240) in 17 when the `JavaCallWrapper` code was ported to what was then `universalUpcallHandler.cpp`.

This pull request has now been integrated.

Changeset: 91457e69
Author:    Andrew John Hughes <andrew at openjdk.org>
URL:       https://git.openjdk.org/jdk21u-dev/commit/91457e694353386737e325e6fa0253bcefb8d579
Stats:     15 lines in 1 file changed: 5 ins; 9 del; 1 mod

8331735: UpcallLinker::on_exit races with GC when copying frame anchor
8343144: UpcallLinker::on_entry racingly clears pending exception with GC safepoints
8286875: ProgrammableUpcallHandler::on_entry/on_exit access thread fields from native

Backport-of: 461ffafeba459c077f1c2d9c5037305b71a8bc2a

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

PR: https://git.openjdk.org/jdk21u-dev/pull/1424


More information about the jdk-updates-dev mailing list