From 846a29afb0b1a206426a3fa0867c37dc406415bc Mon Sep 17 00:00:00 2001 From: Carlo Marcelo Arenas Belón Date: Fri, 15 Apr 2022 16:13:41 -0700 Subject: config.mak.dev: workaround gcc 12 bug affecting "pedantic" CI job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally noticed by Peff[1], but yet to be corrected[2] and planned to be released with Fedora 36 (scheduled for Apr 19). dir.c: In function ‘git_url_basename’: dir.c:3085:13: error: ‘memchr’ specified bound [9223372036854775808, 0] exceeds maximum object size 9223372036854775807 [-Werror=stringop-overread] 3085 | if (memchr(start, '/', end - start) == NULL | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fedora is used as part of the CI, and therefore that release will trigger failures, unless the version of the image used is locked to an older release, as an alternative. Restricting the flag to the affected source file, as well as implementing an independent facility to track these workarounds was specifically punted to minimize the risk of introducing problems so close to a release. This change should be reverted once the underlying gcc bug is solved and which should be visible by NOT triggering a warning, otherwise. [1] https://lore.kernel.org/git/YZQhLh2BU5Hquhpo@coredump.intra.peff.net/ [2] https://bugzilla.redhat.com/show_bug.cgi?id=2075786 Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- config.mak.dev | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config.mak.dev b/config.mak.dev index 3deb076d5e..335efd4620 100644 --- a/config.mak.dev +++ b/config.mak.dev @@ -65,4 +65,9 @@ DEVELOPER_CFLAGS += -Wno-uninitialized endif endif +# https://bugzilla.redhat.com/show_bug.cgi?id=2075786 +ifneq ($(filter gcc12,$(COMPILER_FEATURES)),) +DEVELOPER_CFLAGS += -Wno-error=stringop-overread +endif + GIT_TEST_PERL_FATAL_WARNINGS = YesPlease -- cgit 1.4.1 From 9c539d1027df2a0f6e45b24d518e90d3baf1e7a5 Mon Sep 17 00:00:00 2001 From: Carlo Marcelo Arenas Belón Date: Fri, 15 Apr 2022 16:13:42 -0700 Subject: config.mak.dev: alternative workaround to gcc 12 warning in http.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This provides a "no code change needed" option to the "fix" currently queued as part of ab/http-gcc-12-workaround and therefore should be reverted once that gets merged. Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- config.mak.dev | 1 + 1 file changed, 1 insertion(+) diff --git a/config.mak.dev b/config.mak.dev index 335efd4620..c3104f400b 100644 --- a/config.mak.dev +++ b/config.mak.dev @@ -68,6 +68,7 @@ endif # https://bugzilla.redhat.com/show_bug.cgi?id=2075786 ifneq ($(filter gcc12,$(COMPILER_FEATURES)),) DEVELOPER_CFLAGS += -Wno-error=stringop-overread +DEVELOPER_CFLAGS += -Wno-error=dangling-pointer endif GIT_TEST_PERL_FATAL_WARNINGS = YesPlease -- cgit 1.4.1