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:14 UTC 2025
On Wed, 13 Aug 2025 20:34:55 GMT, Coleen Phillimore <coleenp 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/share/runtime/continuationFreezeThaw.cpp line 788:
>
>> 786:
>> 787: int adjust = frame::metadata_words_at_bottom;
>> 788: #if INCLUDE_ASAN && defined(AARCH64)
>
> Thank you for explaining this conditional compilation. If I understand correctly, this isn't strictly necessary but gives an anchor for the comment to explain why the adjustment is not needed in this case.
Right, the only purpose of that extra adjust is to avoid the asan error. Other than that, avoiding copying `frame::metadata_words_at_bottom` just implicitly sets the `fp` to whatever value is already stored in the stackChunk, so we don’t gain anything. But we can do the same thing we do in the slow path and always patch `fp` with the special unused value, which will also make both freeze paths consistent. I just pushed a commit that implements exactly that.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26660#discussion_r2274749419
More information about the hotspot-dev
mailing list