[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "make check" failure when building GNU m4 1.4.13 on Mac OS X Snow Le
From: |
Leo Davis |
Subject: |
Re: "make check" failure when building GNU m4 1.4.13 on Mac OS X Snow Leopard |
Date: |
Fri, 06 Nov 2009 14:25:05 -0700 |
User-agent: |
Thunderbird 2.0.0.23 (Macintosh/20090812) |
Hello, again.
Eric Blake wrote:
> According to Leo Davis on 11/5/2009 2:27 PM:
> > Hello,
>
> > I tried building GNU m4 1.4.13 on a MacBook running Snow Leopard (10.6.1
> > Intel).
> > I have Xcode 3.2.1 installed (gcc is i686-apple-darwin10-gcc-4.2.1 (GCC)
> > 4.2.1 (Apple Inc. build 5646) (dot 1) according to config.log).
>
> > The "make check" failure I'm seeing is:
>
> > test-strtod.c:647: assertion failed
> > test-strtod.c:648: assertion failed
> > FAIL: test-strtod
>
> Thanks for the report. From m4's perspective, this only affects use of
> the format builtin, and only if you are trying to print floating point
> values, so it's not that bad of a failure. But if it really bothers you,
> you can run 'gl_cv_func_strtod_works=no ./configure' and the failure
> should disappear. From gnulib's perspective, it means our strtod.m4
> filter is not strict enough to detect the bugs in darwin's strtod()
> implementation.
>
> > this corresponds to the source lines:
>
> > ASSERT (ptr1 == input + 4); /* OpenBSD 4.0, HP-UX 11.11,
> > IRIX 6.5, OSF/1 5.1, Solaris 2.5.1, mingw */
> > ASSERT (ptr2 == input + 4); /* OpenBSD 4.0, HP-UX 11.11,
> > IRIX 6.5, OSF/1 5.1, Solaris 2.5.1, mingw */
>
> > in a block that starts with:
>
> > const char input[] = "+nan(";
>
> You may want to report this to Apple, since it is a bug in their libc.
> Meanwhile, so I can better characterize the bug, can you tell me what
> offset ptr1 and ptr2 are pointing at? I'm guessing that darwin's strtod
> is mistakenly consuming the unbalanced '(', since it did parse a NaN.
>
It seems to be that way. I changed the code to this:
ASSERT (ptr1 == input + 4); /* OpenBSD 4.0, HP-UX 11.11,
IRIX 6.5, OSF/1 5.1, Solaris 2.5.1, mingw */
fprintf (stderr, "%s:%d: ptr1=`%p', input+4=`%p'\n", __FILE__,
__LINE__, ptr1, input+4);
ASSERT (ptr2 == input + 4); /* OpenBSD 4.0, HP-UX 11.11,
IRIX 6.5, OSF/1 5.1, Solaris 2.5.1, mingw */
fprintf (stderr, "%s:%d: ptr2=`%p', input+4=`%p'\n", __FILE__,
__LINE__, ptr2, input+4);
and reran the test:
test-strtod.c:647: assertion failed
test-strtod.c:648: ptr1=`0x7fff5fbff815', input+4=`0x7fff5fbff814'
test-strtod.c:649: assertion failed
test-strtod.c:650: ptr2=`0x7fff5fbff815', input+4=`0x7fff5fbff814'
which put ptr1 and ptr2 at the '\0' at the end of input.
Leo