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

Paul Hohensee phh at openjdk.org
Tue May 13 17:27:58 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...

Marked as reviewed by phh (Reviewer).

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

PR Review: https://git.openjdk.org/jdk17u-dev/pull/3441#pullrequestreview-2837598474


More information about the jdk-updates-dev mailing list