RFR: 8359222: [asan] jvmti/vthread/ToggleNotifyJvmtiTest/ToggleNotifyJvmtiTest triggers stack-buffer-overflow error [v2]

Patricio Chilano Mateo pchilanomate at openjdk.org
Wed Aug 13 22:09:13 UTC 2025


On Wed, 13 Aug 2025 12:50:42 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:

>> Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   address David's comments
>
> src/hotspot/cpu/aarch64/continuationFreezeThaw_aarch64.inline.hpp line 108:
> 
>> 106:     // For stub/native frames the value is not used while frozen, and will be constructed
>> 107:     // again when thawing the frame (see ThawBase::new_stack_frame).
>> 108:     fp = FKind::compiled ? *(intptr_t**)(f.sp() - frame::sender_sp_offset) : nullptr;
> 
> I would prefer to set `fp` to something else than `nullptr` for stub/native frames, maybe `not_used_fp`.
> It feels like it would be easier to debug when you look into frames. But if this is the only case where `fp` is set to something else than a "real" memory pointer, I guess it really doesn't matter.

Agree. It’s also helpful to identify invalid accesses as Coleen mentioned. Added changes.

> src/hotspot/cpu/x86/continuationFreezeThaw_x86.inline.hpp line 105:
> 
>> 103:     // For stub/native frames the value is not used while frozen, and will be constructed
>> 104:     // again when thawing the frame (see ThawBase::new_stack_frame).
>> 105:     fp = FKind::compiled ? *(intptr_t**)(f.sp() - frame::sender_sp_offset) : nullptr;
> 
> Same here.

Added.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26660#discussion_r2274747440
PR Review Comment: https://git.openjdk.org/jdk/pull/26660#discussion_r2274747612


More information about the hotspot-dev mailing list