clang static analysis
Jamey Sharp
jamey at minilop.net
Fri May 21 22:18:21 PDT 2010
On Fri, May 21, 2010 at 11:19 AM, Jeremy Huddleston <jeremyhu at apple.com> wrote:
> The analyzer is correct. It sees the call to miFillPolyHelper on line
> 1849 and assumes that pGC can change because it is not const ...
>
> My guess is that applying "const" correctly in many places will help
> the SA avoid false positives like this.
Ooh, interesting. OK. miFillPolyHelper can't take a const pGC though,
because eventually it passes it to ChangeGC (although with the invariant
that it will be changed back before returning).
What about this case though?
http://people.freedesktop.org/~jeremyhu/clang/2010-05-20-1/report-bKYbbq.html
Is clang having some kind of alias analysis trouble there? pDrawable
isn't being passed to any functions, but
&((WindowPtr) pDrawable)->borderClip is...
Say, looks like this putative null-pointer dereference should be
fixable by making AtomError _X_NORETURN:
http://people.freedesktop.org/~jeremyhu/clang/2010-05-20-1/report-0TXsTP.html
I'll send that patch along shortly.
Jamey
More information about the xorg-devel
mailing list