GNU bug report logs -
#23537
timeout test gets false-positive for duration of -1.189731495357231765e+4932
Previous Next
Reported by: Jim Meyering <jim <at> meyering.net>
Date: Sat, 14 May 2016 17:10:01 UTC
Severity: normal
Done: Jim Meyering <jim <at> meyering.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23537 in the body.
You can then email your comments to 23537 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#23537
; Package
coreutils
.
(Sat, 14 May 2016 17:10:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jim Meyering <jim <at> meyering.net>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Sat, 14 May 2016 17:10:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
On systems with recent glibc, this abuse of timeout elicits the expected error:
$ src/timeout -- -1.189731495357231765e+4932 sleep 0
src/timeout: invalid time interval ‘-1.189731495357231765e+4932’
Try 'src/timeout --help' for more information.
But with glibc-2.12's strtod, that input maps to a double-precision
value of 0 rather than to -inf, so timeout does this:
$ src/timeout -- -1.189731495357231765e+4932 sleep 0; echo $?
0
Similarly, the sleep.sh test fails because even without the leading "-",
that number ($LDBL_MAX) maps to 0:
$ src/timeout 0.1 sleep 1.189731495357231765e+4932; echo $?
0
which causes two tests to fail:
tests/misc/timeout-parameters
tests/misc/sleep
I see a couple of ways to avoid trouble.
Perhaps the most general is to make gnulib's strtod module detect and
compensate for these errors.
But that's CentOS6-era glibc, so maybe not worth it for such a corner case.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#23537
; Package
coreutils
.
(Sat, 14 May 2016 17:33:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 23537 <at> debbugs.gnu.org (full text, mbox):
Jim Meyering wrote:
> But that's CentOS6-era glibc, so maybe not worth it for such a corner case.
Yes, I tend to agree, this is quite low priority.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#23537
; Package
coreutils
.
(Sun, 15 May 2016 11:22:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 23537 <at> debbugs.gnu.org (full text, mbox):
On 14/05/16 18:09, Jim Meyering wrote:
> On systems with recent glibc, this abuse of timeout elicits the expected error:
>
> $ src/timeout -- -1.189731495357231765e+4932 sleep 0
> src/timeout: invalid time interval ‘-1.189731495357231765e+4932’
> Try 'src/timeout --help' for more information.
>
> But with glibc-2.12's strtod, that input maps to a double-precision
> value of 0 rather than to -inf, so timeout does this:
>
> $ src/timeout -- -1.189731495357231765e+4932 sleep 0; echo $?
> 0
>
> Similarly, the sleep.sh test fails because even without the leading "-",
> that number ($LDBL_MAX) maps to 0:
>
So the buggy strtod() is treating the overflow as underflow :(
> $ src/timeout 0.1 sleep 1.189731495357231765e+4932; echo $?
> 0
>
> which causes two tests to fail:
>
> tests/misc/timeout-parameters
> tests/misc/sleep
>
> I see a couple of ways to avoid trouble.
> Perhaps the most general is to make gnulib's strtod module detect and
> compensate for these errors.
> But that's CentOS6-era glibc, so maybe not worth it for such a corner case.
Has up to date centos6 the bug?
I didn't see it with glibc-2.12-1.166.el6_7.7.x86_64
cheers,
Pádraig.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#23537
; Package
coreutils
.
(Sun, 15 May 2016 15:08:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 23537 <at> debbugs.gnu.org (full text, mbox):
On Sun, May 15, 2016 at 4:21 AM, Pádraig Brady <P <at> draigbrady.com> wrote:
> Has up to date centos6 the bug?
> I didn't see it with glibc-2.12-1.166.el6_7.7.x86_64
Yes. I am surprised that you don't see it and I do:
$ rpm -q glibc
glibc-2.12-1.166.el6_7.7.x86_64
$ src/timeout 0.1 sleep 1.189731495357231765e+4932; echo $?
0
Reply sent
to
Jim Meyering <jim <at> meyering.net>
:
You have taken responsibility.
(Sun, 15 May 2016 15:53:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jim Meyering <jim <at> meyering.net>
:
bug acknowledged by developer.
(Sun, 15 May 2016 15:53:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 23537-done <at> debbugs.gnu.org (full text, mbox):
tags 23537 notabug
stop
On Sun, May 15, 2016 at 8:06 AM, Jim Meyering <jim <at> meyering.net> wrote:
> On Sun, May 15, 2016 at 4:21 AM, Pádraig Brady <P <at> draigbrady.com> wrote:
>> Has up to date centos6 the bug?
>> I didn't see it with glibc-2.12-1.166.el6_7.7.x86_64
>
> Yes. I am surprised that you don't see it and I do:
>
> $ rpm -q glibc
> glibc-2.12-1.166.el6_7.7.x86_64
> $ src/timeout 0.1 sleep 1.189731495357231765e+4932; echo $?
> 0
Pádraig guessed (correctly) that I'd updated coreutils' gnulib to
include a temporarily buggy xstrdod
(811b09243ca01827469827bf0973728a8619d249), but not yet past the fix
from a day or so later.
So this was all a false alert.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 13 Jun 2016 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 66 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.