RFR: 8291654: AArch64: assert from JDK-8287393 causes crashes
David Holmes
dholmes at openjdk.org
Tue Aug 2 01:14:47 UTC 2022
On Mon, 1 Aug 2022 23:53:05 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> https://github.com/openjdk/jdk/commit/6cbc234ad17c5a0c4b3d6ea76f807c27c1dc8330 adds an assert checking `in_scratch_emit_size` is set during the output phase of C2 compilation. The assert can fail if C1 uses `trampoline_call`.
>> The assert is not needed as the calculation of `in_scratch_emit_size` is short-circuited to false if it is C1.
>
> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 883:
>
>> 881: assert(StubRoutines::aarch64::complete() &&
>> 882: Thread::current()->is_Compiler_thread() &&
>> 883: Compile::current()->output() != NULL, "not in output phase of C2 compilation");
>
> The code is under `#ifdef COMPILER2` which assumes that it is executed only for C2. Which make it confusing because it CAN be executed by C1.
> There is check at line 885 `is_c2_compile()` which is true only for C2. May be we can rearrange code to make it less confusing.
> On other hand if `check_emit_size` could be `true` for C1 why we should emit trampoline for it and not for C2?
@vnkozlov I will leave it to you to decide whether to sponsor as-is or look for additional changes. The failures seem intermittent and have not re-occurred in the next two CI runs.
-------------
PR: https://git.openjdk.org/jdk/pull/9709
More information about the hotspot-compiler-dev
mailing list