RFR: 8320886: Unsafe_SetMemory0 is not guarded

David Holmes dholmes at openjdk.org
Wed Nov 29 02:15:08 UTC 2023


On Tue, 28 Nov 2023 18:58:30 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> See JBS issue.
>> 
>> Guard the memory access done in Unsafe_SetMemory0 to prevent a SIGBUS error from crashing the VM when a truncated memory mapped file is accessed.
>> 
>> Testing: local `InternalErrorTest`, Tier 1-5 (ongoing)
>
> I'm looking into the crash on mac

@JornVernee is there some "new" usage of this method such that it needs guarding? I find it interesting that in the 3+ months that the fix for [JDK-8191278](https://bugs.openjdk.org/browse/JDK-8191278) was developed and reviewed, the need to include `SetMemory0` was never raised once. And that was over 4 years ago.

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

PR Comment: https://git.openjdk.org/jdk/pull/16848#issuecomment-1831087207


More information about the hotspot-dev mailing list