RFR: 8290780: AArch64: Crash in c2 nmethod running RunThese30M.java [v2]

Dean Long dlong at openjdk.org
Fri Jul 22 18:38:39 UTC 2022


On Fri, 22 Jul 2022 15:30:33 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> Fix that masks the offsets used when adrp() is passed an unreachable destination. This reloc allows e.g. `adrp; movk; ldr` to access anywhere in the address space.
>> 
>> 
>> #  SIGSEGV (0xb) at pc=0x0000ffff55964edc, pid=2843096, tid=2850366
>> #
>> # JRE version: Java(TM) SE Runtime Environment (20.0+7) (fastdebug build 20-ea+7-377)
>> # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-ea+7-377, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
>> # Problematic frame:
>> # J 91101 c2 java.io.ObjectOutputStream.enableReplaceObject(Z)Z java.base at 20-ea (47 bytes) @ 0x0000ffff55964edc [0x0000ffff55964e80+0x000000000000005c]
>
> Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8290780: AArch64: Crash in c2 nmethod running RunThese30M.java

Looks good.  To detect bad addresses at emit time, you could add some asserts that check  is_valid_AArch64_address(target) in _adrp() and the patch code.  Also maybe check after patching that the desired value was rewritten using  target_addr_for_insn().

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

Marked as reviewed by dlong (Reviewer).

PR: https://git.openjdk.org/jdk/pull/9615


More information about the hotspot-dev mailing list