[jdk17u-dev] Integrated: 8321509: False positive in get_trampoline fast path causes crash

Boris Ulasevich bulasevich at openjdk.org
Thu May 22 14:21:55 UTC 2025


On Fri, 4 Apr 2025 16:31:12 GMT, Boris Ulasevich <bulasevich at openjdk.org> wrote:

> This change is a backport of [JDK-8321509](https://bugs.openjdk.org/browse/JDK-8321509). 
> 
> **backport issue №1**
> This change adds two functions to trampoline_stub_Relocation class. On macos-aarch64 platform it triggers clang to report:
> 
> /Users/runner/work/jdk17u-dev/jdk17u-dev/src/hotspot/share/code/relocInfo.hpp:1212:8: error: 'pack_data_to' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
>   void pack_data_to(CodeSection * dest);
>        ^
>    ... (rest of output omitted)
> 
> I resolved the issue by adding the override keyword manually ([see commit_2](https://github.com/openjdk/jdk17u-dev/pull/3441/commits/fd823c77b23b8f59011a8e9dc70b4cd51350e663)). A cleaner solution could be to backport [8298913: Add override qualifiers to Relocation classes](https://github.com/openjdk/jdk/pull/11716/files), which properly introduces the missing specifier. However, that change introduces additional dependencies (see #3513), so in this context, I’d prefer a minimal, targeted fix for this change only.
> 
> **backport issue №2**
> A manual merge was also required due to minor discrepancies between the mainline and jdk17u repositories. The reasons for the manual intervention are as follows:
> 
> - Copyright Year
>   - The mainline patch updated the copyright from 2023 to 2024
>   - In jdk17u the year is still 2021
> - NULL -> nullptr conversion 
>   - mainline deals with nullptr after JDK-8301493: Replace NULL with nullptr in cpu/aarch64
> - CodeBlob Lookup Changes
>   - on the mainline "JDK-8290025: Remove the Sweeper" changed CodeCache::find_blob_unsafe call to CodeCache::find_blob
>   - in jdk17u the old variant is used
> 
> See the minor mismatches below. Left: original diff on JDK mainline. Right: diff actually applied
> 
> diff --git a/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp b/src/ho    diff --git a/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp b/src/ho
> --- a/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp                    --- a/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp
> +++ b/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp                    +++ b/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp
> @@ -1,5 +1,5 @@                                                         @@ -1,5 +1,5 @@
>  /*                                                                      /*
> - * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All righ |  - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All righ
> + * Copyright (c) 1997, 2024, Oracle and/or its af...

This pull request has now been integrated.

Changeset: cf0fed77
Author:    Boris Ulasevich <bulasevich at openjdk.org>
Committer: Paul Hohensee <phh at openjdk.org>
URL:       https://git.openjdk.org/jdk17u-dev/commit/cf0fed77eacd3cf1e3588083cffc10281a15d139
Stats:     74 lines in 6 files changed: 34 ins; 14 del; 26 mod

8321509: False positive in get_trampoline fast path causes crash

Reviewed-by: phh
Backport-of: 73e3e0edeb20c6f701b213423476f92fb05dd262

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

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


More information about the jdk-updates-dev mailing list