RFR: 8320886: Unsafe_SetMemory0 is not guarded [v2]

David Holmes dholmes at openjdk.org
Mon Dec 4 03:23:44 UTC 2023


On Wed, 29 Nov 2023 19:13:34 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)
>
> Jorn Vernee has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - add handling for missing instruction
>  - Print out instruction

Okay fix seems fine.

Thanks

test/hotspot/jtreg/runtime/Unsafe/InternalErrorTest.java line 158:

> 156:             case 3:
> 157:                 MemorySegment segment = MemorySegment.ofBuffer(buffer);
> 158:                 // testing Unsafe.setMemory, trying to access next  page after truncation.

Pre-existing nit in the line you copied - there is a double-space after 'next'

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/16848#pullrequestreview-1761533861
PR Review Comment: https://git.openjdk.org/jdk/pull/16848#discussion_r1413325910


More information about the hotspot-dev mailing list