This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Work around GCC 10 warning regression in string/tester.c


On 10/2/19 7:18 AM, Florian Weimer wrote:
> * Jeff Law:
> 
>> On 10/2/19 6:41 AM, Florian Weimer wrote:
>>> * Joseph Myers:
>>>
>>>> Any comments on either the patch itself or the principle of working
>>>> around such issues in glibc to allow more effective testing if not
>>>> fixed quickly in GCC?
>>>
>>> I think we should disable those middle-end warnings for the entire file
>>> altogether.
>> When y'all figure out how you want to do this, can you please pull the
>> fix into Fedora?  I was running the Fedora tester using the latest gcc
>> snapshot:
>>
>>> BUILDSTDERR: tester.c: In function 'test_strncat':
>>> BUILDSTDERR: tester.c:395:10: error: 'strncat' forming offset [50, 98] is out of the bounds [0, 50] of object 'one' with type 'char[50]' [-Werror=array-bounds]
>>> BUILDSTDERR:   395 |   (void) strncat (one, two, 99);
>>> BUILDSTDERR:       |          ^~~~~~~~~~~~~~~~~~~~~~
>>> BUILDSTDERR: tester.c:61:6: note: 'one' declared here
>>> BUILDSTDERR:    61 | char one[50];
>>> BUILDSTDERR:       |      ^~~
>>
>> So this going to affect Fedora when gcc-10 drops in.
> 
> Sure, we pull current upstream master into Fedora once per week.
Perfect.  That works for me.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]