RFR: 8370344: Arbitrary Java frames on stack during scoped access [v2]

Jorn Vernee jvernee at openjdk.org
Wed Oct 29 17:35:37 UTC 2025


On Wed, 29 Oct 2025 16:30:56 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Short-circuit after finding our session
>
> src/hotspot/share/prims/scopedMemoryAccess.cpp line 81:
> 
>> 79:     if (is_scoped) {
>> 80:       assert(!would_have_bailed, "would have missed scoped method on release build");
>> 81:       func(stream);
> 
> Why do we remove the short-circuiting here? For example, if we have is_accessing_session set to true already, why can't we short circuit?

You're right. We can short circuit if we've already found our session. That will help cases where we have an agent loaded.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27919#discussion_r2474354136


More information about the hotspot-dev mailing list