RFR: 8148783: aarch64: SEGV running SpecJBB2013

Edward Nevill edward.nevill at gmail.com
Mon Feb 1 20:33:57 UTC 2016


Hi,

Please review the following webrev

http://cr.openjdk.java.net/~enevill/8148783/webrev.0/

JIRA Issue: https://bugs.openjdk.java.net/browse/JDK-8148783

The bug is explained in some detail in the JIRA issue.

The problem is that the sign is not preserved in the following code from adrp(...)

    long offset = dest_page - pc_page;
    offset = (offset & ((1<<20)-1)) << 12;

This generally works because the following movk overwrites bits 32..47

However on larger memory systems of 256 Gb it could happen that the PC address was

0x0000ffffXXXXXXXX

in which case the falsely positive offset could wrap to

0x00010000XXXXXXXX

Bit 48 does not get overwritten by the following movk, hence forming an invalid address.

The solution is to use int32_t for offset instead of long, so it gets sign extended correctly when added to the pc().

All the best,
Ed.




More information about the hotspot-compiler-dev mailing list