[aarch64-port-dev ] RFR(XS): 8249781: AArch64: AOT compiled code crashes if C2 allocates r27
Andrew Haley
aph at redhat.com
Fri Jul 24 07:49:37 UTC 2020
Hi,
On 24/07/2020 07:08, Nick Gasson wrote:
> 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.
OK, thanks. Are there any backports needed?
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-compiler-dev
mailing list