Bug 165693 - function erfc abort on some value
Summary: function erfc abort on some value
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc
Version: 4.0
Hardware: ia64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 168429
TreeView+ depends on / blocked
 
Reported: 2005-08-11 12:23 UTC by mickael gastineau
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version: RHBA-2006-0124
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-07 18:21:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0124 0 qe-ready SHIPPED_LIVE glibc bug fix update 2006-03-06 05:00:00 UTC

Description mickael gastineau 2005-08-11 12:23:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/312.1 (KHTML, like Gecko) Safari/312

Description of problem:
The function erfc aborts on some double-precision value (for example 27.E0 or 28.E0).  
For these values, erfc should return a small value 
With gdb , I see that erfc calls abort function. 
This problem only occurs on ia64 architecture. On x86 or x86_64, there is no problem.




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

How reproducible:
Always

Steps to Reproduce:
1. create the following source file bug100805.c
#include <math.h>

double f(double x)
{
 return erfc(x);
}

int main(int argc)
{
 double d=27.E0*argc;
 double q;
 printf("d=%g\n",d);
 q=f(d);
 printf("q=%g\n", q);
 printf("end\n");
 
}

2. compile the code :
 gcc bug100805.c -o bug -lm
3. execute the program :
 ./bug


Actual Results:  d=27
Aborted


Expected Results:  it should print q with a denormalized number or the value 0.
example :
d=27
q=5.23705e-319
end
 

Additional info:

[xxx tmp]$ gcc -v 
Reading specs from /usr/lib/gcc/ia64-redhat-linux/3.4.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --
enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit 
--disable-libunwind-exceptions --enable-java-awt=gtk --host=ia64-redhat-linux
Thread model: posix

[xxx tmp]$ gdb ./bug
GNU gdb Red Hat Linux (6.3.0.0-0.31rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "ia64-redhat-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run
Starting program: /users/gastin/tmp/bug 
Failed to read a valid object file image from memory.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
d=27

Program received signal SIGABRT, Aborted.
0xa000000000010641 in ?? ()
(gdb) bt
#0  0xa000000000010641 in ?? ()
#1  0x200000000016b2b0 in raise () from /lib/tls/libc.so.6.1
#2  0x200000000016db70 in abort () from /lib/tls/libc.so.6.1
#3  0x20000000000ac5b0 in __libm_error_support () from /lib/tls/libm.so.6.1
#4  0x20000000000aad80 in __libm_error_region () from /lib/tls/libm.so.6.1
#5  0x40000000000007b0 in f ()
#6  0x40000000000008d0 in main ()
(gdb)

Comment 1 Jakub Jelinek 2005-08-24 08:22:44 UTC
http://sources.redhat.com/ml/libc-hacker/2005-08/msg00008.html
The fix is for the time being in Fedora development glibc-2.3.90-9 and above,
will be considered for RHEL4 U3.

Comment 7 Red Hat Bugzilla 2006-03-07 18:21:56 UTC
An advisory 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-2006-0124.html



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