RFR: 8362306: HotSpotJVMCIRuntime.getMirror can crash [v5]
Tom Rodriguez
never at openjdk.org
Thu Jul 17 14:37:53 UTC 2025
On Wed, 16 Jul 2025 15:40:27 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
>> This PR fixes `HotSpotJVMCIRuntime.getMirror(ResolvedJavaMethod method)` and `HotSpotJVMCIRuntime.getMirror(ResolvedJavaField field)` so that they return null for `<clinit>` and an injected field respectively instead of crashing.
>
> Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
>
> test that getMirror on clinit returns null
Marked as reviewed by never (Reviewer).
src/hotspot/share/jvmci/jvmciCompilerToVM.cpp line 3011:
> 3009: requireInHotSpot("asReflectionField", JVMCI_CHECK_NULL);
> 3010: Klass* klass = UNPACK_PAIR(Klass, klass);
> 3011: InstanceKlass* iklass = check_field(klass, index, JVMCI_CHECK_NULL);
There's another copy of this idiom in getDeclaredFieldsInfo which might be worth fixing.
-------------
PR Review: https://git.openjdk.org/jdk/pull/26346#pullrequestreview-3029824400
PR Review Comment: https://git.openjdk.org/jdk/pull/26346#discussion_r2213530140
More information about the graal-dev
mailing list