RFR: 8371918: aarch64: Incorrect pointer dereference in TemplateInterpreterGenerator::generate_native_entry

Kurt Miller kurt at openjdk.org
Wed Nov 19 14:22:37 UTC 2025


On Wed, 19 Nov 2025 12:12:37 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> According to InterpreterRuntime::prepare_native_call(), if there is a signal handler, which is checked first, then there should be a native function.  So I wonder if we can remove the check for the native function from all CPU ports.
>
> I did also wonder how it is not breaking now with uninitialized native entries. But I see we are doing this init as part of signature handler resolution: https://github.com/openjdk/jdk/blob/54893dc5c2a4702896029b1844bc9496325c8f26/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp#L1323-L1334 -- before we hit this block. So, as @dean-long says, maybe we do not need this native method entry check at all. But this fix is fine to unbreak BSD/AArch64 alone.

@shipilev Thank you for the review and sponsor. I was wondering why this issue had not been discovered previously. It does appear that the check against unsatisfied link may be unnecessary.

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

PR Comment: https://git.openjdk.org/jdk/pull/28327#issuecomment-3552963583


More information about the hotspot-dev mailing list