[uClibc 0001382]: strtod() ERANGE not set on underflow

bugs at busybox.net bugs at busybox.net
Thu Jun 7 18:33:38 UTC 2007


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=1382 
====================================================================== 
Reported By:                chmeee
Assigned To:                uClibc
====================================================================== 
Project:                    uClibc
Issue ID:                   1382
Category:                   Math Library
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             06-06-2007 10:42 PDT
Last Modified:              06-07-2007 11:33 PDT
====================================================================== 
Summary:                    strtod() ERANGE not set on underflow
Description: 
The Xerces test suite checks for underflow on strtod() parsing of the
string

+2.250738585072014e-329

Also with the negative value of this.  It correctly returns 0, but does
not set errno to ERANGE.
====================================================================== 

---------------------------------------------------------------------- 
 bernhardf - 06-06-07 11:35  
---------------------------------------------------------------------- 
May i suggest that you look into libc/stdlib/_strtod.c, looks like
__fp_range_check() to verify that ERANGE is also set on underflow and
submit a patch?

thanks,

 

---------------------------------------------------------------------- 
 chmeee - 06-07-07 11:33  
---------------------------------------------------------------------- 
I'm looking into it, and did read through that function before submitting
the bug report, but I'm not quite sure how to fix it without breaking
strtold.  I've looked through glibc's strtod(), and that detects overflow
and underflow during the parse, not afterwards, and it's the same with
strtold() and strtof().  I was hoping someone with better floating point
skills would be able to more easily address it. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-06-07 10:42  chmeee         New Issue                                    
06-06-07 10:42  chmeee         Status                   new => assigned     
06-06-07 10:42  chmeee         Assigned To               => uClibc          
06-06-07 11:34  bernhardf      Note Added: 0002459                          
06-06-07 11:35  bernhardf      Note Edited: 0002459                         
06-07-07 11:33  chmeee         Note Added: 0002461                          
======================================================================




More information about the uClibc-cvs mailing list