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

Andrew John Hughes andrew at openjdk.org
Tue Apr 8 14:14:36 UTC 2025


On Thu, 3 Apr 2025 22:19:28 GMT, Andrew John Hughes <andrew at openjdk.org> wrote:

> Partial 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. That fix to `::on_exit` is included here.
> 
> The other hunk in the 24 and 21u versions is omitted as the `::on_entry` method has not been modified by [JDK-8272526](https://bugs.openjdk.org/browse/JDK-8272526) which is what moved the thread exception handling to native code.

This pull request has now been integrated.

Changeset: 8ea7310b
Author:    Andrew John Hughes <andrew at openjdk.org>
URL:       https://git.openjdk.org/jdk17u-dev/commit/8ea7310b57403f20ac8b0c6e13ecd67e0360c9c1
Stats:     8 lines in 1 file changed: 2 ins; 6 del; 0 mod

8331735: UpcallLinker::on_exit races with GC when copying frame anchor
8286875: ProgrammableUpcallHandler::on_entry/on_exit access thread fields from native

Reviewed-by: mbalao
Backport-of: 91457e694353386737e325e6fa0253bcefb8d579

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

PR: https://git.openjdk.org/jdk17u-dev/pull/3434


More information about the jdk-updates-dev mailing list