[OE-core] [PATCH v3] gcc-sanitizers: fix -Werror=maybe-uninitialized issue

Khem Raj raj.khem at gmail.com
Mon Apr 15 14:19:13 UTC 2019


On Mon, Apr 15, 2019 at 2:38 AM Adrian Bunk <bunk at stusta.de> wrote:

> On Mon, Apr 08, 2019 at 08:53:49PM -0700, Khem Raj wrote:
> > On Mon, Apr 8, 2019 at 7:32 PM <mingli.yu at windriver.com> wrote:
> > >
> > > From: Mingli Yu <Mingli.Yu at windriver.com>
> > >
> > > When DEBUG_BUILD = "1" added in local.conf, there
> > > comes below build error when "bitbake gcc-sanitizers":
> > > |
> ./../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:
> In function 'elf_is_symlink':
> > > |
> ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21:
> error: 'st.st_mode' may be used uninitialized in this function
> [-Werror=maybe-uninitialized]
> > > |   return S_ISLNK (st.st_mode);
> > >
> > > Per https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00315.html,
> > > the gcc upstream thinks the warning is a false
> > > positive and suggests to use -O2 rather than -Og
> > > or -O1 when compiling that file, so pass -Wno-error
> > > to compiler when -Og is used to silence the error.
> > >
> >
> > Not particular to this change but in general if a package says that it
> > does not support -Og
> > then we are just going to get into more and more untested grounds
> > especially during runtime
> > so I wonder how useful it will be to use -Og for such packages or any
> > other non supported
> > combination for that matter.
>
> This has nothing to do with specific packages not supporting -Og
> or any other combination, it is just about how to best workaround
> a compiler bug temporarily.
>
> gcc has bug(s) emitting bogus warnings with -Og, and these are build
> failures with some packages that build with -Werror.
>
> None of this is related to whether or not the packages will work
> at runtime with -Og.


What are you trying to convey ? That’s what I mentioned before I began my
reply however to reiterate my point was if a package is not usually built
and tested with this combination which is evident because it fails to build
then how good would it be if we fix this error especially complex packages
like compilers so is it worth to fix them or disable Og for them

>
>
> cu
> Adrian
>
> --
>
>        "Is there not promise of rain?" Ling Tan asked suddenly out
>         of the darkness. There had been need of rain for many days.
>        "Only a promise," Lao Er said.
>                                        Pearl S. Buck - Dragon Seed
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20190415/18026007/attachment.html>


More information about the Openembedded-core mailing list