On 12/19/2016 11:30 AM, Jakub Jelinek wrote:
On Mon, Dec 19, 2016 at 10:52:13AM -0700, Jeff Law wrote:
No, it highlights that the warning is done in a wrong place where it suffers
from too many false positives.
I don't inherently see this as generating "too many false positives". And as
Martin says, the warning works with precisely what it is presented.

I think the particular stumbling point is path isolation at some point as
resulted in a NULL explicitly in calls at various places.  That is a *GOOD*
thing to detect and warn against as it represents cases that are often well
hidden and often difficult for a human to analyze (based on my work with
NULL pointer dereference warnings).

Please see e.g. PR78859 for just two recently reported issues (there are more
from gathering what has been said on IRC etc., David said powerpc* bootstrap
is still broken, ...).
One has the non-NULL tests just as a weirdo programming style, not actually
a sign that NULL will ever show there.  So this one could be fixed in theory 
rather
than adding hacks to assert it is non-NULL just remove all those NULL tests.
The other is just too cryptic, there is not even locus printed for the
strlen, so nobody can guess where it is coming from, guessing why will be
hard even if location is provided.
But I don't see that as inherently blocking this patch. It's pointing out a bad API interface. It's no different than when I added teh NULL pointer dereference warnings a while ago -- we had the exact same kinds of problems.

The question is how many of them are there. We *know* this kind of thing is going to happen. Again, at this point I don't see 78859 as inherently meaning Martin's patch should be reverted.



Jeff


Reply via email to