This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Coverity run for glibc 2.23.
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 26 Feb 2016 17:28:44 +0000
- Subject: Re: Coverity run for glibc 2.23.
- Authentication-results: sourceware.org; auth=none
- References: <56CFE2D2 dot 1040605 at redhat dot com>
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