Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 27317 - date with -f (file) option core dumps
date with -f (file) option core dumps
Product: Red Hat Linux
Classification: Retired
Component: sh-utils (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-02-12 21:09 EST by Christian Lupien
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-12 21:09:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Christian Lupien 2001-02-12 21:09:29 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.0.30 i586)

When using the date program with the -f option to convert many dates
contained in a file it core dumps at  the end of the file. If I use both -u
and -f it does not. 
The problem seem to be in "free (initial_TZ);" of batch_convert because
initial_TZ is 
not set if  universal_time is not true.

Reproducible: Always
Steps to Reproduce:
1. date >date.test
2. date -f date.test	 +%s

Actual Results:  The ouput is the number of sesonds followed by
"Segmentation fault (core dumped)"

Expected Results:  It should  not core dump. "date -u -f date.test +%s" 
works ok but requires the timezone to be specified.

This is on date version: date (GNU sh-utils) 2.0
From RedHat 6.2: rpm=sh-utils-2.0-5
Redhat 7.0 is also based on the same gnu date 2.0 version  so it could also
be affected.
Comment 1 Bernhard Rosenkraenzer 2001-03-06 09:49:58 EST
Fixed in the current version...

date >date.test
date -f data.test
Tue Mar 6 15:48:26 CET 2001
date -f date.test +%s

Note You need to log in before you can comment on or make changes to this bug.