Bug 88104 - uinitialized variable used for __ieee754_gammal_r(NaN,)
uinitialized variable used for __ieee754_gammal_r(NaN,)
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-04-05 14:02 EST by John Reiser
Modified: 2007-04-18 12:52 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-04-09 15:21:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Reiser 2003-04-05 14:02:02 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529

Description of problem:
__tgammal(NaN) tests an uninitialized local variable because __ieee754_gammal_r
does not set *signgam for a NaN.

        y = __ieee754_gammal_r(x,&local_signgam);
        if (local_signgam < 0) y = -y;

  if ((es & 0x7fff) == 0x7fff && ((hx & 0x7fffffff) | lx) != 0)
    /* NaN, return it.  */
    return x;

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Run testcase math/test-ldouble and watch when x==NaN.

Actual Results:  local_signgam is tested even though its value has not been set.

Expected Results:  local_signgam is tested only when its value has been set.

Additional info:

It would be more efficient if __ieee754_gammal_r just set "*signgam = 0;"
immediately upon entry, instead of for [almost-]every boundary case.
Comment 1 Jakub Jelinek 2003-04-09 15:21:40 EDT
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.