GNU bug report logs - #16872
`date -d 'TZ="America/Los_Angeles" "00:00 + 1 hour"'` crashes

Previous Next

Package: coreutils;

Reported by: Mike Frysinger <vapier <at> gentoo.org>

Date: Tue, 25 Feb 2014 08:15:02 UTC

Severity: normal

Tags: fixed

Merged with 21186

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mike Frysinger <vapier <at> gentoo.org>
Subject: bug#16872: closed (Re: bug#16872: `date -d 'TZ="America/Los_Angeles"
 "00:00 + 1 hour"'` crashes)
Date: Thu, 27 Feb 2014 23:59:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#16872: `date -d 'TZ="America/Los_Angeles" "00:00 + 1 hour"'` crashes

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 16872 <at> debbugs.gnu.org.

-- 
16872: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16872
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Pádraig Brady <P <at> draigBrady.com>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: bug-gnulib <bug-gnulib <at> gnu.org>, Mike Frysinger <vapier <at> gentoo.org>,
 16872-done <at> debbugs.gnu.org
Subject: Re: bug#16872: `date -d 'TZ="America/Los_Angeles" "00:00 + 1 hour"'`
 crashes
Date: Thu, 27 Feb 2014 23:58:33 +0000
[Message part 3 (text/plain, inline)]
On 02/27/2014 09:48 PM, Bernhard Voelker wrote:
> On 02/25/2014 12:11 PM, Pádraig Brady wrote:
>> Proposed patch attached.
> 
> parse_datetime per se is pretty ugly, however, the fix LGTM:
> +1

I've pushed that to gnulib,
and the attached to coreutils.

thanks for the review,
Pádraig.

[coreutils-date-crash.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Mike Frysinger <vapier <at> gentoo.org>
To: bug-coreutils <at> gnu.org
Subject: `date -d 'TZ="America/Los_Angeles" "00:00 + 1 hour"'` crashes
Date: Tue, 25 Feb 2014 03:13:52 -0500
[Message part 6 (text/plain, inline)]
as reported by Bertrand Jacquin, this crashes:
$ date -d 'TZ="America/Los_Angeles" "00:00 + 1 hour"'
Segmentation fault

(gdb) bt
#0  0x00007ffff7ab1014 in __GI___libc_free (mem=0x7fffffffc8b0) at malloc.c:2942
#1  0x0000000000406730 in parse_datetime (result=result <at> entry=0x7fffffffcab0, p=<optimized out>, p <at> entry=0x7fffffffd04a "TZ=\"America/Los_Angeles\" \"00:00 + 1 hour\"", now=<optimized out>, now
@entry=0x0) at ./lib/parse-datetime.y:1307
#2  0x00000000004023c7 in main (argc=0x3, argv=0x7fffffffcc68) at src/date.c:522

that's 15fca2a02e38d69915c52ef41eee3c7d52b67f3e i happened to have already
built, but seems to reproduce easily across older versions.
-mike
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 6 years and 219 days ago.

Previous Next


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