RFR: 8298006: Build failure by maybe-uninitialized error on Linux s390x GCC8
Magnus Ihse Bursie
ihse at openjdk.org
Fri Dec 2 13:42:06 UTC 2022
On Fri, 2 Dec 2022 08:41:18 GMT, Ichiroh Takiguchi <itakiguchi at openjdk.org> wrote:
> I changed GCC toolchain from GCC6 to GCC8 on SLES12SP5 Linux s390x.
> I could see following errors:
>
> src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c: In function 'allocateRasterArray':
> src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c:2944:73: error: 'roff[3]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> (((*inP&rasterP->sppsm.maskArray[c]) >> roff[c])
> ~~~~^~~
>
>
> According to error messages,
> roff and loff may not be initialized.
Just because you get a compilation error does not mean the issue belongs with the build group. This is just about the source code in AWT, so the client-libs team will handle this review.
That being said, I did have a look at the code and I think they might be skeptical. There seems to be no inherent s390x change here, rather the compiler you are using seem to be a bit trigger-happy on this analysis.
Also, both gcc 6 and 8 are incredibly old. Gcc 6 is from 2016, and gcc 8 is from 2018. I would recommend you get a newer gcc version instead, or possibly build with `--disable-warnings-as-errors`.
-------------
PR: https://git.openjdk.org/jdk/pull/11475
More information about the build-dev
mailing list