RFR: 8320886: Unsafe_SetMemory0 is not guarded [v2]

Jorn Vernee jvernee at openjdk.org
Wed Nov 29 19:13:36 UTC 2023


On Wed, 29 Nov 2023 19:10:42 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

src/hotspot/cpu/x86/assembler_x86.cpp line 973:

> 971:       return ip;
> 972:     default:
> 973:       fatal("not handled: 0x0F%2X", 0xFF & *(ip-1));

I've improved the error reporting a bit here to print out the problematic instruction. I was only able to reproduce the crash through GHA.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16848#discussion_r1409753452


More information about the hotspot-dev mailing list