Skip to content

Commit 846a29a

Browse files
carenasgitster
authored andcommitted
config.mak.dev: workaround gcc 12 bug affecting "pedantic" CI job
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/[email protected]/ [2] https://bugzilla.redhat.com/show_bug.cgi?id=2075786 Signed-off-by: Carlo Marcelo Arenas Belón <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d516b2d commit 846a29a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

config.mak.dev

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,9 @@ DEVELOPER_CFLAGS += -Wno-uninitialized
6565
endif
6666
endif
6767

68+
# https://bugzilla.redhat.com/show_bug.cgi?id=2075786
69+
ifneq ($(filter gcc12,$(COMPILER_FEATURES)),)
70+
DEVELOPER_CFLAGS += -Wno-error=stringop-overread
71+
endif
72+
6873
GIT_TEST_PERL_FATAL_WARNINGS = YesPlease

0 commit comments

Comments
 (0)