git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] config.mak.dev: workaround gcc 12 bug affecting "pedantic" CI job

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Apr 15, 2022, 23:41 UTC
Message-ID
<220416.8635idc3mk.gmgdl@evledraar.gmail.com>
In-Reply-To
<20220415231342.35980-2-carenas@gmail.com>
On Fri, Apr 15 2022, Carlo Marcelo Arenas Belón wrote:
Show 39 quoted lines
> 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 <carenas@gmail.com>
> ---
>  config.mak.dev | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/config.mak.dev b/config.mak.dev
> index 3deb076d5e3..335efd46203 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

What I meant with "just set -Wno-error=stringop-overread on gcc12 for dir.(o|s|sp)?" was that you can set this per-file:

	dir.sp dir.s dir.o: EXTRA_CPPFLAGS += -Wno-error=stringop-overread

Ditto for the warning suppression in 2/2, we don't currently have any other warnings like this, but we can suppress them more narrowly.

Previous: Carlo Marcelo Arenas BelónNext: Carlo Arenas
Message 9 of 25 in “ci: lock "pedantic" job into fedora 35 and other cleanup”
  1. ci: lock "pedantic" job into fedora 35 and other cleanupCarlo Marcelo Arenas Belón, Apr 15, 2022
  2. Ævar Arnfjörð BjarmasonApr 15, 2022
  3. Phillip WoodApr 15, 2022
  4. Junio C HamanoApr 15, 2022
  5. Carlo ArenasApr 15, 2022
  6. Junio C HamanoApr 15, 2022
  7. 0/2 ci: avoid failures for pedantic job with fedora 36Carlo Marcelo Arenas Belón, Apr 15, 2022
  8. 1/2 config.mak.dev: workaround gcc 12 bug affecting "pedantic" CI jobCarlo Marcelo Arenas Belón, Apr 15, 2022
  9. Ævar Arnfjörð BjarmasonApr 15, 2022
  10. Carlo ArenasApr 16, 2022
  11. Ævar Arnfjörð BjarmasonApr 16, 2022
  12. Junio C HamanoApr 16, 2022
  13. Ævar Arnfjörð BjarmasonApr 16, 2022
  14. Junio C HamanoApr 16, 2022
  15. Junio C HamanoApr 15, 2022
  16. 2/2 config.mak.dev: alternative workaround to gcc 12 warning in http.cCarlo Marcelo Arenas Belón, Apr 15, 2022
  17. Junio C HamanoApr 15, 2022
  18. Carlo ArenasApr 16, 2022
  19. Junio C HamanoApr 16, 2022
  20. Ævar Arnfjörð BjarmasonApr 16, 2022
  21. Junio C HamanoApr 16, 2022
  22. Carlo ArenasApr 16, 2022
  23. Junio C HamanoApr 16, 2022
  24. Ævar Arnfjörð BjarmasonApr 16, 2022
  25. Ævar Arnfjörð BjarmasonApr 16, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.