[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strtod [was: M4 1.4.14 on AIX 7.1BETA]

From: Eric Blake
Subject: Re: strtod [was: M4 1.4.14 on AIX 7.1BETA]
Date: Thu, 29 Jul 2010 10:56:41 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100720 Fedora/3.1.1-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.1.1

[again, please keep the lists in the loop; and splitting my reply to
multiple topics]

On 07/29/2010 10:46 AM, Rainer Tammer wrote:
>  Hello Eric,
> source: m4-
>>> 1. The test-strtod is still failing
>>> # ./test-strtod (compiled and executet manually)
>>> test-strtod.c:389: assertion failed
>> With the system's strtod, or with gnulib's replacement? 
> It looks like the replacement was used, but please see below...
>>  I'm wondering if you may have missed some prerequisites in the process.
>> How about running:
>> cd tests && make -k check
> /bin/sh: 7340286 IOT/Abort trap(coredump)
> FAIL: test-strtod
> ===============================
> 1 of 103 tests failed
> (6 tests were not run)
> See tests/test-suite.log
> Please report to address@hidden
> ===============================
> This is a other failure:
> test-strtod.c:389: assertion failed
>   {
>     const char input[] = "0x";
>     char *ptr;
>     double result;
>     errno = 0;
>     result = strtod (input, &ptr);
>     ASSERT (result == 0.0);
>     ASSERT (!signbit (result));
> ->    ASSERT (ptr == input + 1);          /* glibc-2.3.6, MacOS X 10.3,
> FreeBSD 6.2 */
>     ASSERT (errno == 0);
>   }

Now that the replacement strtod() calls the system's strtod() under the
hood, this could very well be a bug in our replacement not massaging the
data enough to work around the underlying strtod() bug.  I'll take a
closer look into it.

By the way, the snapshot I provided gives more details about why
configure rejected your system strtod(); could you provide the exit
status contained in config.log at the point where it ran the ./conftest
for strtod()?

Another thing that might be helpful is to find _all_ strtod bugs in your
system, to make sure our wrapper is being careful for all of them.  If
you could apply this patch, then recompile and rerun test-strtod.c, that
would give us a better listing of all points of failure in your system's
strtod(), rather than just the first point of failure.

diff --git i/tests/test-strtod.c w/tests/test-strtod.c
index cdb57b2..e13f91c 100644
--- i/tests/test-strtod.c
+++ w/tests/test-strtod.c
@@ -28,6 +28,8 @@ SIGNATURE_CHECK (strtod, double,
 #include <string.h>

 #include "isnand-nolibm.h"
+#define abort() /* no-op */
+#undef strtod
 #include "macros.h"

 /* Avoid requiring -lm just for fabs.  */

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]