[aarch64-port-dev ] RFR(XS): 8249781: AArch64: AOT compiled code crashes if C2 allocates r27

Nick Gasson nick.gasson at arm.com
Fri Jul 24 06:08:52 UTC 2020


Hi,

Bug: https://bugs.openjdk.java.net/browse/JDK-8249781
Webrev: http://cr.openjdk.java.net/~ngasson/8249781/webrev.0/

AOT compiled code always assumes r27 is the heap base pointer, but since
JDK-8242449 C2 can allocate it as a general register if the compressed
class base is null. If C2 complied code that uses r27 runs before AOT
code, rheapbase will be clobbered causing a crash in the AOT code.

To reproduce:

  make test TEST="compiler/aot/cli/jaotc/CompileModuleTest.java" \
     JTREG="VM_OPTIONS=-Xcomp -XX:-TieredCompilation"

Fix by checking if AOT is enabled before using r27 as a general
register.

Tested with jtreg hotspot_all_no_apps and jdk_core.

--
Thanks,
Nick


More information about the aarch64-port-dev mailing list