This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Coverity run for glibc 2.23.


On Fri, 26 Feb 2016, Carlos O'Donell wrote:

> ________________________________________________________________________________________________________
> *** CID 123615:  Uninitialized variables  (UNINIT)
> /home/carlos/src/glibc-2.23-coverity/glibc-2.23/sysdeps/ieee754/dbl-64/lgamma_neg.c: 290 in __lgamma_neg()
> 284       if ((i & 1) == 0 && i == -2 * x)
> 285         return 1.0 / 0.0;
> 286       double xn = ((i & 1) == 0 ? -i / 2 : (-i - 1) / 2);
> 287       i -= 4;
> 288       *signgamp = ((i & 2) == 0 ? -1 : 1);
> 289     
> >>>     CID 123615:  Uninitialized variables  (UNINIT)
> >>>     Declaring variable "ctx" without initializer.
> 290       SET_RESTORE_ROUND (FE_TONEAREST);

Looks rather like Coverity either doesn't understand the macros / inlines 
used for optimized rounding mode handling, or doesn't like that they 
deliberately only set the parts of the context that are relevant for the 
particular function.  Unless anyone can find a case in which (for example) 
the macros set only one of SSE and 387 state but then try to restore both.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]