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: [RFC v5 01/21] sunrpc/clnt_udp: Ensure total_deadline is initalised


On 9/5/19 9:21 AM, Joseph Myers wrote:
> On Thu, 5 Sep 2019, Jeff Law wrote:
> 
>> BTW, has a bug been filed against GCC for the bogus warning?
> 
> In this case, it looks like the code is
> 
>   if (xargs != NULL)
>     {
>        total_deadline = ...
>     }
> 
>   ...
> 
>   if (xargs != NULL)
>     {
>       use total_deadline
>     }
> 
> (and xargs doesn't get modified in the function and the various gotos in 
> this function are all after that setting of total_deadline).  So that 
> should be a known issue (and we could consider if the existing comment
> 
>   /* Choose the timeout value.  For non-sending usage (xargs == NULL),
>      the total deadline does not matter, only cu->cu_wait is used
>      below.  */
> 
> is sufficient or should be extended to say explicitly the warning is 
> bogus).
Right.  My concern is we should be analyzing this on the GCC side.

I can hazard a guess that there's too much code between the two tests
and as a result jump threading isn't deemed profitable enough.  That's
not terribly unusual.

But even so, the uninit pass has predicate analysis which should see the
use as properly guarded.

So ISTM that something isn't behaving properly on the GCC side so we
should get bug report opened so that we can analyze why GCC isn't doing
the right thing here.

jeff


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