[cfe-dev] Clang Analysis of glibc 2.13

Ted Kremenek kremenek at apple.com
Tue May 10 09:57:28 PDT 2011


While the analyzer doesn't explicitly reason about complex numbers yet, it shouldn't issue a warning here either.  Can you file a bugzilla report with a self-contained test case?

On May 10, 2011, at 5:26 AM, Jonathan Sauer wrote:

> Hello,
> 
>> In case anyone is interested, I ran the clang analyzer on glibc 2.13.
>> The resulting report can be downloaded here :
>> 
>> http://sites.google.com/site/clanganalyzer/home/glibc-213
> 
> Interesting. Luckily for getopt.c, the clang analyzer does not include a check for copied&pasted
> code ;-)
> 
> Some of the reports seem to be false positives, though; e.g s_cosf.c:
> 
> 66	      __complex__ float y;
> 67	 
> 68	      __real__ y = -__imag__ x;
> 69	      __imag__ y = __real__ x;
> 70	 
> 71	      res = __ccoshf (y);
> 		2	Function call argument is an uninitialized value
> 
> It seems that the clang analyzer does not understand glibc's handling of complex numbers and thus
> does not notice that "y" is initialized in lines 68f.
> 
> 
> Jonathan
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110510/c9d14ed6/attachment.html>


More information about the cfe-dev mailing list