Re: RFR: 8286562: GCC 12 reports some compiler warnings [v10]

2022-05-26 Thread Kim Barrett
On Thu, 26 May 2022 10:55:28 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v10]

2022-05-26 Thread Yasumasa Suenaga
> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 on > Fedora 36. > As you can see, the warnings spreads several areas. Let me know if I should > separate them by area. > > * -Wstringop-overflow > * src/hotspot/share/oops/array.hpp > * >

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v9]

2022-05-26 Thread Yasumasa Suenaga
On Thu, 26 May 2022 03:48:31 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Change Array::data() implementation >> - Avoid stringop-overflow warning in jfrTraceIdBits.inline.hpp > >

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v9]

2022-05-25 Thread Kim Barrett
On Wed, 25 May 2022 09:16:43 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v8]

2022-05-25 Thread Yasumasa Suenaga
On Wed, 25 May 2022 01:50:57 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains 11 commits: >> >> - Merge remote-tracking branch 'upstream/master' into gcc12-warnings >> - Use getter

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v9]

2022-05-25 Thread Yasumasa Suenaga
> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 on > Fedora 36. > As you can see, the warnings spreads several areas. Let me know if I should > separate them by area. > > * -Wstringop-overflow > * src/hotspot/share/oops/array.hpp > * >

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-24 Thread Kim Barrett
On Sun, 22 May 2022 16:45:11 GMT, Kim Barrett wrote: >> It might be GCC bug... >> >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578 >> >> This issue is for integer literal, but [Comment >> 29](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c29) mentions address >> calculation (e.g.

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v8]

2022-05-24 Thread Kim Barrett
On Sun, 22 May 2022 08:40:28 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-22 Thread Kim Barrett
On Sun, 22 May 2022 08:45:48 GMT, Yasumasa Suenaga wrote: >> I don't think this warning has anything to do with that NULL check. But I'm >> still not understanding what it is warning about. The "region of size 0" part >> of the warning message seems important, but I'm not (yet?) seeing how it

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-22 Thread Kim Barrett
On Sun, 22 May 2022 08:35:54 GMT, Yasumasa Suenaga wrote: >> `Array::_data` is a pseudo flexible array member. "Pseudo" because C++ >> doesn't have flexible array members. The compiler is completely justified in >> complaining about the apparently out-of-bounds accesses. >> >> There is a

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-22 Thread Yasumasa Suenaga
On Sun, 22 May 2022 05:00:21 GMT, Kim Barrett wrote: >> I guess GCC cannot understand `assert(dest != NULL` immediately preceding it. >> >> >> In file included from >> /home/ysuenaga/github-forked/jdk/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdLoadBarrier.inline.hpp:33,

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-22 Thread Yasumasa Suenaga
On Sun, 22 May 2022 03:15:20 GMT, Kim Barrett wrote: >> Like the others, it is caused by `Array::at_put()`. >> >> >> In file included from >> /home/ysuenaga/github-forked/jdk/src/hotspot/share/oops/annotations.hpp:28, >> from >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v8]

2022-05-22 Thread Yasumasa Suenaga
> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 on > Fedora 36. > As you can see, the warnings spreads several areas. Let me know if I should > separate them by area. > > * -Wstringop-overflow > * src/hotspot/share/oops/array.hpp > * >

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-21 Thread Kim Barrett
On Tue, 17 May 2022 12:43:02 GMT, Yasumasa Suenaga wrote: >> src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp >> line 103: >> >>> 101: PRAGMA_STRINGOP_OVERFLOW_IGNORED >>> 102: *dest = op(bits, *dest); >>> 103: PRAGMA_DIAG_POP >> >> I see no stringop here.

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-21 Thread Kim Barrett
On Tue, 17 May 2022 12:38:55 GMT, Yasumasa Suenaga wrote: >> src/hotspot/share/classfile/classFileParser.cpp line 5970: >> >>> 5968: PRAGMA_STRINGOP_OVERFLOW_IGNORED >>> 5969: _cp->symbol_at_put(hidden_index, _class_name); >>> 5970: PRAGMA_DIAG_POP >> >> I don't understand these warning

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v7]

2022-05-21 Thread Yasumasa Suenaga
On Tue, 17 May 2022 13:32:42 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-17 Thread Yasumasa Suenaga
On Tue, 17 May 2022 04:52:44 GMT, Kim Barrett wrote: >> src/hotspot/share/opto/memnode.cpp line 1413: >> >>> 1411:bt == T_BYTE|| bt == T_SHORT || >>> 1412:bt == T_INT || bt == T_LONG, "wrong type = >>> %s", type2name(bt)); >>> 1413:

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-17 Thread Yasumasa Suenaga
On Tue, 17 May 2022 03:06:49 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert change for java.c , parse_manifest.c , LinuxPackage.c > > src/hotspot/share/opto/type.cpp line 4300: > >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v7]

2022-05-17 Thread Yasumasa Suenaga
> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 on > Fedora 36. > As you can see, the warnings spreads several areas. Let me know if I should > separate them by area. > > * -Wstringop-overflow > * src/hotspot/share/oops/array.hpp > * >

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-17 Thread Yasumasa Suenaga
On Tue, 17 May 2022 03:14:05 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert change for java.c , parse_manifest.c , LinuxPackage.c > > src/hotspot/share/classfile/bytecodeAssembler.cpp

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v6]

2022-05-17 Thread Yasumasa Suenaga
> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 on > Fedora 36. > As you can see, the warnings spreads several areas. Let me know if I should > separate them by area. > > * -Wstringop-overflow > * src/hotspot/share/oops/array.hpp > * >

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-17 Thread Yasumasa Suenaga
On Tue, 17 May 2022 03:02:55 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert change for java.c , parse_manifest.c , LinuxPackage.c > >

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-17 Thread Yasumasa Suenaga
On Tue, 17 May 2022 01:43:25 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert change for java.c , parse_manifest.c , LinuxPackage.c > > src/hotspot/share/classfile/classFileParser.cpp

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-16 Thread Kim Barrett
On Tue, 17 May 2022 03:05:09 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert change for java.c , parse_manifest.c , LinuxPackage.c > > src/hotspot/share/opto/memnode.cpp line 1413: >

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-16 Thread Kim Barrett
On Fri, 13 May 2022 10:02:30 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v4]

2022-05-16 Thread Kim Barrett
On Thu, 12 May 2022 18:28:02 GMT, Kim Barrett wrote: >> Thanks for all to review this PR! I think we should separate this issue as >> following: >> >> * Suppress warnings >> * make/modules/java.desktop/lib/Awt2dLibraries.gmk >> * src/hotspot/share/classfile/bytecodeAssembler.cpp >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v4]

2022-05-16 Thread Yasumasa Suenaga
On Thu, 12 May 2022 11:02:02 GMT, Magnus Ihse Bursie wrote: >> Thanks for all to review this PR! I think we should separate this issue as >> following: >> >> * Suppress warnings >> * make/modules/java.desktop/lib/Awt2dLibraries.gmk >> * src/hotspot/share/classfile/bytecodeAssembler.cpp

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-16 Thread Phil Race
On Thu, 12 May 2022 00:26:41 GMT, Yasumasa Suenaga wrote: >> I don't understand what the actual warning is getting at .. can anyone >> explain it ? >> >> FWIW the code is still the same in upstream harfbuzz >> https://github.com/harfbuzz/harfbuzz/blob/main/src/hb-font.cc > > I've pasted a part

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-16 Thread Phil Race
On Fri, 13 May 2022 10:02:30 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-13 Thread Yasumasa Suenaga
On Fri, 13 May 2022 10:02:30 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v5]

2022-05-13 Thread Yasumasa Suenaga
> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 on > Fedora 36. > As you can see, the warnings spreads several areas. Let me know if I should > separate them by area. > > * -Wstringop-overflow > * src/hotspot/share/oops/array.hpp > * >

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v4]

2022-05-12 Thread Phil Race
On Thu, 12 May 2022 01:27:30 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v4]

2022-05-12 Thread Kim Barrett
On Thu, 12 May 2022 01:29:13 GMT, Yasumasa Suenaga wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Calculate char offset before realloc() > > Thanks for all to review this PR! I think we should separate this

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v4]

2022-05-12 Thread Magnus Ihse Bursie
On Thu, 12 May 2022 01:29:13 GMT, Yasumasa Suenaga wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Calculate char offset before realloc() > > Thanks for all to review this PR! I think we should separate this

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v4]

2022-05-11 Thread Yasumasa Suenaga
On Thu, 12 May 2022 01:27:30 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Yasumasa Suenaga
On Wed, 11 May 2022 13:47:43 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Avoid pragma error in before GCC 12 > > src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c line 193: > >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v4]

2022-05-11 Thread Yasumasa Suenaga
> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 on > Fedora 36. > As you can see, the warnings spreads several areas. Let me know if I should > separate them by area. > > * -Wstringop-overflow > * src/hotspot/share/oops/array.hpp > * >

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Yasumasa Suenaga
On Wed, 11 May 2022 13:43:55 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Avoid pragma error in before GCC 12 > > src/java.base/unix/native/libjli/java_md_common.c line 135: > >> 133:

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v3]

2022-05-11 Thread Yasumasa Suenaga
> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 on > Fedora 36. > As you can see, the warnings spreads several areas. Let me know if I should > separate them by area. > > * -Wstringop-overflow > * src/hotspot/share/oops/array.hpp > * >

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Yasumasa Suenaga
On Wed, 11 May 2022 14:27:27 GMT, Kim Barrett wrote: >> src/java.base/share/native/libjli/java.c line 1629: >> >>> 1627: const char *arg = jargv[i]; >>> 1628: if (arg[0] == '-' && arg[1] == 'J') { >>> 1629: *nargv++ = (arg[2] == '\0') ? NULL : JLI_StringDup(arg +

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Yasumasa Suenaga
On Wed, 11 May 2022 13:35:43 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Avoid pragma error in before GCC 12 > > src/hotspot/share/utilities/compilerWarnings_gcc.hpp line 51: > >> 49: >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Yasumasa Suenaga
On Wed, 11 May 2022 19:11:16 GMT, Phil Race wrote: >> make/modules/java.desktop/lib/Awt2dLibraries.gmk line 462: >> >>> 460:HARFBUZZ_DISABLED_WARNINGS_gcc := type-limits >>> missing-field-initializers strict-aliasing >>> 461:HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := reorder >>>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Phil Race
On Wed, 11 May 2022 13:35:00 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Avoid pragma error in before GCC 12 > > make/modules/java.desktop/lib/Awt2dLibraries.gmk line 462: > >> 460:

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Magnus Ihse Bursie
On 2022-05-11 16:01, Kim Barrett wrote: Globally disabling use-after-free warnings for this package seems really questionable. If these are problems in the code, just suppressing the warning and leaving the problems to bite us seems like a bad idea. And the problems ought to be reported

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Kim Barrett
On Wed, 11 May 2022 13:56:44 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Avoid pragma error in before GCC 12 > > src/java.base/share/native/libjli/java.c line 1629: > >> 1627:

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Kim Barrett
On Wed, 11 May 2022 08:40:21 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Yasumasa Suenaga
On Wed, 11 May 2022 12:48:38 GMT, Alan Bateman wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Avoid pragma error in before GCC 12 > > src/java.base/unix/native/libjli/java_md_common.c line 135: > >> 133:

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Alan Bateman
On Wed, 11 May 2022 08:40:21 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Yasumasa Suenaga
On Wed, 11 May 2022 08:40:21 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Yasumasa Suenaga
On Wed, 11 May 2022 11:48:00 GMT, Magnus Ihse Bursie wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Avoid pragma error in before GCC 12 > > The harfbuzz disabled warning looks good, so build changes are

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Magnus Ihse Bursie
On Wed, 11 May 2022 08:40:21 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v2]

2022-05-11 Thread Yasumasa Suenaga
> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 on > Fedora 36. > As you can see, the warnings spreads several areas. Let me know if I should > separate them by area. > > * -Wstringop-overflow > * src/hotspot/share/oops/array.hpp > * >

RFR: 8286562: GCC 12 reports some compiler warnings

2022-05-11 Thread Yasumasa Suenaga
I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 on Fedora 36. As you can see, the warnings spreads several areas. Let me know if I should separate them by area. * -Wstringop-overflow * src/hotspot/share/oops/array.hpp *