Re: clang's static checker report. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: clang's static checker report.
Date
Msg-id 1289.1252904645@sss.pgh.pa.us
Whole thread Raw
In response to Re: clang's static checker report.  (Grzegorz Jaskiewicz <gj@pointblue.com.pl>)
Responses Re: clang's static checker report.
List pgsql-hackers
Grzegorz Jaskiewicz <gj@pointblue.com.pl> writes:
> usual round of updates to the scan report.
> Today's report available at:

> http://zlew.org/postgresql_static_check/scan-build-2009-09-12-1/

Looks like the clang guys still have some work to do.  The
null-dereference reports, in particular, seem to be willing to make
self-contradictory assumptions in order to claim there is a possibility
of a null dereference.  The clearest example I found was this one:
http://zlew.org/postgresql_static_check/scan-build-2009-09-12-1/report-Ybdv3J.html#EndPath
where to conclude that lp might be null, clang first assumes
PageGetMaxOffsetNumber(page) < offnum (at line 4251); but it then
must assume that that is *false* in order to suppose that control
can arrive at the dereference inside ItemIdIsNormal at line 4254.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Scott Mohekey
Date:
Subject: Timestamp to time_t
Next
From: Pavel Stehule
Date:
Subject: Re: Issues for named/mixed function notation patch