[aarch64-port-dev ] RFR: Fix AArch64 build failure after JDK-8062808 backport
Andrew Hughes
gnu.andrew at redhat.com
Tue Jan 5 15:46:52 UTC 2021
On 10:27 Mon 04 Jan , Aleksey Shipilev wrote:
> My CI catches build failure in current aarch64-port/jdk8u-shenandoah:
>
> /home/shade/aarch64-port-jdk8u-shenandoah/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp:
> In member function ‘Address LIR_Assembler::as_Address(LIR_Address*,
> Register)’:
> /home/shade/aarch64-port-jdk8u-shenandoah/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:223:32:
> error: control reaches end of non-void function [-Werror=return-type]
>
> I believe this only affects 8u aarch64 after -Wreturn-type was enabled (JDK-8062808).
>
> Note that push to JDK 9 has the "return Address()" in the place we want, but
> that addition is missing in aarch64-port/jdk8u-shenandoah!
> https://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/d498aba2c736#l10.210
>
> So, a trivial fix is to put in the missing addition:
>
> diff -r 76dace090781 src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
> --- a/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp Tue Dec 15 20:18:10 2020 +0100
> +++ b/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp Mon Jan 04 04:24:42 2021 -0500
> @@ -207,6 +207,7 @@
> return Address(base, tmp, Address::lsl(addr->scale()));
> }
> }
> + return Address();
> }
>
> I would like to push it to current aarch64-port/jdk8u-shenandoah, which is
> stabilizing for 8u282. I believe the patch is innocuous. Andrew, this might
> complicate the merges somewhat, please advise whether and when you want this
> patch in.
>
> Testing: 8u aarch64 native build
>
> --
> Thanks,
> -Aleksey
>
Yes, that would be:
https://icedtea.classpath.org//hg/icedtea8-forest/hotspot?cmd=changeset;node=adaf109718c1
https://src.fedoraproject.org/rpms/java-1.8.0-openjdk/blob/master/f/pr3519-fix_further_functions_with_a_missing_return_value.patch
which is why my builds didn't catch it. We've been doing -Wreturn-type for a long time,
since a case was the cause of a crash with, if I recall correctly, GCC 7.
This does mean it is already fixed in the proposed AArch64 merge:
https://cr.openjdk.java.net/~andrew/openjdk8/8257192/hotspot/webrev.02/raw_files/new/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
I'll look at your latest comnents shortly so we can finally get that in for 8u292.
If you approve the b03 merge, I can push what I have pending and then this can be committed on top.
Thanks for catching it,
--
Andrew :)
Senior Free Java Software Engineer
OpenJDK Package Owner
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
More information about the aarch64-port-dev
mailing list