RFR: 8361447: [REDO] Checked version of JNI Release<type>ArrayElements needs to filter out known wrapped arrays

Martin Doerr mdoerr at openjdk.org
Tue Jul 8 15:41:39 UTC 2025


On Tue, 8 Jul 2025 02:17:01 GMT, David Holmes <dholmes at openjdk.org> wrote:

> The original PR (https://github.com/openjdk/jdk/pull/26123) had incorrect usage of `SafeFetch32`. This PR replaces that with the use of `os::is_readable_range` as proposed by @tstuefe  (thank you!). In addition I found that code was no longer getting exercised by the regression test so I added a gtest for that (during which it was discovered that the new implementation in `verify` requires any gtest that uses it to be `TEST_VM` rather than `TEST`).
> 
> Testing: tiers 1-4
> 
> Thanks

I think this looks good. Let's see what the tests and UBSan say (Matthias is testing).

src/hotspot/share/memory/guardedMemory.hpp line 157:

> 155:     void* get_tag2() const { return _tag2; }
> 156: 
> 157: 

Maybe remove extra empty lines?

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

PR Review: https://git.openjdk.org/jdk/pull/26177#pullrequestreview-2998191810
PR Review Comment: https://git.openjdk.org/jdk/pull/26177#discussion_r2192857313


More information about the hotspot-dev mailing list