Bug 88104 - uinitialized variable used for __ieee754_gammal_r(NaN,)
Summary: uinitialized variable used for __ieee754_gammal_r(NaN,)
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-04-05 19:02 UTC by John Reiser
Modified: 2016-11-24 15:13 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2003-04-09 19:21:39 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2003:136 high SHIPPED_LIVE glibc bugfix errata 2003-04-09 04:00:00 UTC
Red Hat Product Errata RHSA-2003:089 high SHIPPED_LIVE : Updated glibc packages fix vulnerabilities in RPC XDR decoder 2003-04-10 04:00:00 UTC

Description John Reiser 2003-04-05 19:02:02 UTC
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.

-----sysdeps/generic/w_tgammal.c:37
        y = __ieee754_gammal_r(x,&local_signgam);
        if (local_signgam < 0) y = -y;
-----

-----sysdeps/ieee754/ldbl-96/e_gammal_r.c:47
  if ((es & 0x7fff) == 0x7fff && ((hx & 0x7fffffff) | lx) != 0)
    /* NaN, return it.  */
    return x;
-----

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

How reproducible:
Always

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

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 19:21:40 UTC
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.

http://rhn.redhat.com/errata/RHBA-2003-136.html



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