[aarch64-port-dev ] RFR(S): 8237483: AArch64 C1 OopMap inserted twice fatal error
Andrew Haley
aph at redhat.com
Mon Jul 27 09:40:57 UTC 2020
On 7/27/20 9:50 AM, Nick Gasson wrote:
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8237483
> Webrev: http://cr.openjdk.java.net/~ngasson/8237483/webrev.0/
>
> In the method java.util.zip.Inflater::inflate C1 generates these two LIR
> instructions:
>
> 724 move [c_rarg3|I] [Base:[c_rarg1|L] Disp: 2147483647|I] [patch_normal] [bci:95]
> 728 throw [c_rarg3|I] [c_rarg0|L] [bci:100]
>
> The move instruction at 724 generates a runtime call to deoptimise the
> method since this patching is not implemented on AArch64. An oop map is
> inserted for the return PC of the runtime call
> (LIR_Assembler::deoptimize_trap()). The following throw LIR instruction
> then inserts another oop map at the same PC, triggering an assertion
> failure.
>
> To reproduce:
>
> make test TEST="compiler/c1/CanonicalizeArrayLength.java" \
> JTREG="VM_OPTIONS=-Xcomp"
>
> This patch just adds a NOP in this situation to ensure the PCs are
> unique. Not sure if there's a better way to do it?
I would have thought it would make more sense, rather than asserting,
simply to detect that we already have an oopmap so we don't need
another one. Having said that, it's probably not worth worrying about
so your fix is OK.
It needs a better comment, though. The only way to find out why this
code is here would be to trawl the email archives. Something like this
would do:
// In the method java.util.zip.Inflater::inflate C1 generates these two LIR
// instructions:
// 724 move [c_rarg3|I] [Base:[c_rarg1|L] Disp: 2147483647|I] [patch_normal] [bci:95]
// 728 throw [c_rarg3|I] [c_rarg0|L] [bci:100]
// The move instruction at 724 generates a runtime call to deoptimise the
// method since this patching is not implemented on AArch64. An oop map is
// inserted for the return PC of the runtime call
// (LIR_Assembler::deoptimize_trap()). The following throw LIR instruction
// then inserts another oop map at the same PC, triggering an assertion
// failure.
--
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 aarch64-port-dev
mailing list