Re: clang's static checker report.

From: Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Alex Hunsaker <badalex(at)gmail(dot)com>, pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: clang's static checker report.
Date: 2009-08-30 18:28:21
Message-ID: 528AEEBB-3179-4F1B-8A8C-895FE2316166@pointblue.com.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 30 Aug 2009, at 19:14, Tom Lane wrote:

> Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl> writes:
>> please don't tell me that this is bogus: http://zlew.org/postgresql_static_check/scan-build-2009-08-30-4/report-7JaICX.html#EndPath
>
> Yes, it's bogus. ctid is never passed as NULL. It might point at
> an "invalid" itempointer (one with ip_posid == 0). Look at the only
> call site.

so why do we check if the pointer is valid ?

>
> This seems to indicate that clang is stupider than I would have hoped.
> Isn't it capable of doing the same types of analysis that gcc does
> when inlining?

well, it is usable, but that doesn't mean complete. That's why I am
trying to work both ways to provide some info to clang-checker devs,
and you guys - with the reports it generates.
on the side note, xcode in snow leopard uses it under the hood to do
'build & analyze', and it helped me to locate few potential issues in
my iphone code. Now, of course my code is times less complicated than
postgresql's, but still - it is potentially useful.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-08-30 18:33:47 Re: clang's static checker report.
Previous Message Tom Lane 2009-08-30 18:14:00 Re: clang's static checker report.