Re: [PATCH] libdwfl: Rewrite reading of ar_size in elf_begin_rand

2022-07-29 Thread Mark Wielaard
Hi, On Thu, 2022-07-28 at 15:48 +0200, Mark Wielaard wrote: > With GCC 12.1.1, glibc 2.3a, -fsanitize=undefined and > -D_FORTIFY_SOURCE=3 we get the following error message: > > In file included from /usr/include/ar.h:22, > from ../libelf/libelfP.h:33, > from cor

Re: [PATCH] libdwfl: Rewrite reading of ar_size in elf_begin_rand

2022-07-29 Thread Siddhesh Poyarekar
On 2022-07-28 13:27, Siddhesh Poyarekar wrote: Interesting, I'll take a closer look at this from the gcc context.  I obviously don't have any strong opinions about the elfutils patch :) I reduced this to the below program and I see it warns with `-D_FORTIFY_SOURCE=3 -O2 -fsanitize=undefined` a

Re: [PATCH] libdwfl: Rewrite reading of ar_size in elf_begin_rand

2022-07-28 Thread Siddhesh Poyarekar
On 2022-07-28 09:48, Mark Wielaard wrote: With GCC 12.1.1, glibc 2.3a, -fsanitize=undefined and -D_FORTIFY_SOURCE=3 we get the following error message: In file included from /usr/include/ar.h:22, from ../libelf/libelfP.h:33, from core-file.c:31: In function ‘p

Re: [PATCH] libdwfl: Rewrite reading of ar_size in elf_begin_rand

2022-07-28 Thread Mark Wielaard
On Thu, 2022-07-28 at 15:48 +0200, Mark Wielaard wrote: > With GCC 12.1.1, glibc 2.3a, -fsanitize=undefined and > -D_FORTIFY_SOURCE=3 we get the following error message: Sorry for the typo, it is glibc 2.35. Basically an up to date Fedora 36 system (replicated on x86_64, ppc64le and s390x).

[PATCH] libdwfl: Rewrite reading of ar_size in elf_begin_rand

2022-07-28 Thread Mark Wielaard
With GCC 12.1.1, glibc 2.3a, -fsanitize=undefined and -D_FORTIFY_SOURCE=3 we get the following error message: In file included from /usr/include/ar.h:22, from ../libelf/libelfP.h:33, from core-file.c:31: In function ‘pread’, inlined from ‘pread_retry’ at ../li