Another GLIBC build error with GCC6

Jeff Law law@redhat.com
Tue Jul 21 21:22:00 GMT 2015


On 07/21/2015 02:16 PM, Steve Ellcey wrote:
> On Tue, 2015-07-21 at 14:10 -0600, Jeff Law wrote:
>
>>> diff --git a/elf/dl-deps.c b/elf/dl-deps.c
>>> index eee146a..d4c5c00 100644
>>> --- a/elf/dl-deps.c
>>> +++ b/elf/dl-deps.c
>>> @@ -30,6 +30,8 @@
>>>
>>>    #include <dl-dst.h>
>>>
>>> +#include <libc-internal.h>
>>> +
>>>    /* Whether an shared object references one or more auxiliary objects
>>>       is signaled by the AUXTAG entry in l_info.  */
>>>    #define AUXTAG	(DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
>>> @@ -226,7 +228,11 @@ _dl_map_object_deps (struct link_map *map,
>>>    	  needed = needed_space;
>>>    	}
>>>
>>> +      /* Blah, blah. */
>>> +      DIAG_PUSH_NEEDS_COMMENT;
>>> +      DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Warray-bounds");
>>>          if (l->l_info[DT_NEEDED] || l->l_info[AUXTAG] || l->l_info[FILTERTAG])
>>> +      DIAG_POP_NEEDS_COMMENT;
>>>    	{
>>>    	  const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]);
>>>    	  struct openaux_args args;
>> Any chance I could get you to file a GCC bug for this bogus warning?
>>
>> Jeff
>
> Is it bogus?  I never followed the various macros down far enough to see
> if the references were out of bounds or not.  I will see if I can create
> a cut-down test case.
If it's not a false positive, then you're suppressing a warning on code 
that's got undefined behaviour...  That seems unwise.

Jeff



More information about the Libc-alpha mailing list