GNU bug report logs - #21906
julian-day->date negative input breakage

Previous Next

Package: guile;

Reported by: Zefram <zefram <at> fysh.org>

Date: Fri, 13 Nov 2015 14:32:03 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

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 21906 in the body.
You can then email your comments to 21906 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#21906; Package guile. (Fri, 13 Nov 2015 14:32:24 GMT) Full text and rfc822 format available.

Acknowledgement sent to Zefram <zefram <at> fysh.org>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Fri, 13 Nov 2015 14:32:30 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Zefram <zefram <at> fysh.org>
To: bug-guile <at> gnu.org
Subject: julian-day->date negative input breakage
Date: Fri, 13 Nov 2015 14:31:04 +0000
scheme@(guile-user)> (use-modules (srfi srfi-19))
scheme@(guile-user)> (julian-day->date 0 0)
$1 = #<date nanosecond: 0 second: 0 minute: 0 hour: 12 day: 24 month: 11 year: -4714 zone-offset: 0>
scheme@(guile-user)> (julian-day->date -1 0)
$2 = #<date nanosecond: 0 second: 0 minute: 0 hour: -12 day: 24 month: 11 year: -4714 zone-offset: 0>
scheme@(guile-user)> (julian-day->date -100000 0)
$3 = #<date nanosecond: 0 second: 0 minute: 0 hour: -12 day: -19 month: 3 year: -4987 zone-offset: 0>
scheme@(guile-user)> (julian-day->date -10000000 0)
$4 = #<date nanosecond: 0 second: 0 minute: 0 hour: -12 day: -30 month: 0 year: -32092 zone-offset: 0>

Observe the various erroneous field values: negative hour, negative
day-of-month, zero month.  These occur in general for various negative
JD inputs.  Not only should the conversion not produce these kinds of
values, the date structure type probably ought to reject them if they
get that far.

-zefram




Reply sent to Mark H Weaver <mhw <at> netris.org>:
You have taken responsibility. (Sun, 21 Oct 2018 03:22:01 GMT) Full text and rfc822 format available.

Notification sent to Zefram <zefram <at> fysh.org>:
bug acknowledged by developer. (Sun, 21 Oct 2018 03:22:02 GMT) Full text and rfc822 format available.

Message #10 received at 21906-done <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Zefram <zefram <at> fysh.org>
Cc: 21906-done <at> debbugs.gnu.org
Subject: Re: bug#21906: julian-day->date negative input breakage
Date: Sat, 20 Oct 2018 23:20:44 -0400
Zefram <zefram <at> fysh.org> writes:

> scheme@(guile-user)> (use-modules (srfi srfi-19))
> scheme@(guile-user)> (julian-day->date 0 0)
> $1 = #<date nanosecond: 0 second: 0 minute: 0 hour: 12 day: 24 month: 11 year: -4714 zone-offset: 0>
> scheme@(guile-user)> (julian-day->date -1 0)
> $2 = #<date nanosecond: 0 second: 0 minute: 0 hour: -12 day: 24 month: 11 year: -4714 zone-offset: 0>
> scheme@(guile-user)> (julian-day->date -100000 0)
> $3 = #<date nanosecond: 0 second: 0 minute: 0 hour: -12 day: -19 month: 3 year: -4987 zone-offset: 0>
> scheme@(guile-user)> (julian-day->date -10000000 0)
> $4 = #<date nanosecond: 0 second: 0 minute: 0 hour: -12 day: -30 month: 0 year: -32092 zone-offset: 0>

This is fixed by commit a58c7abd72648f77e4ede5f62a2c4e7969bb7f95 on the
stable-2.2 branch.  I'm closing this bug, but please reopen if
appropriate.

     Thanks!
       Mark




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 18 Nov 2018 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 158 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.