NetBSD Problem Report #46782

From mac@SS.Culver.Net  Tue Aug  7 22:31:50 2012
Return-Path: <mac@SS.Culver.Net>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id E138563B85F
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  7 Aug 2012 22:31:49 +0000 (UTC)
Message-Id: <20120807211621.84EAC239255@SS.Culver.Net>
Date: Tue,  7 Aug 2012 14:16:21 -0700 (PDT)
From: mac@SS.Culver.Net
Reply-To: mac@SS.Culver.Net
To: gnats-bugs@gnats.NetBSD.org
Subject: date -r  (8) returns incorrect values
X-Send-Pr-Version: 3.95

>Number:         46782
>Category:       bin
>Synopsis:       date -r overflows
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 07 22:35:00 +0000 2012
>Closed-Date:    Tue Aug 07 22:45:24 +0000 2012
>Last-Modified:  Wed Aug 08 07:35:02 +0000 2012
>Originator:     mac@SS.Culver.Net
>Release:        NetBSD 5.1_RC3
>Organization:

>Environment:
System: NetBSD SS.Culver.Net 5.1_RC3 NetBSD 5.1_RC3 (GENERIC) #0: Sat Jun 12 20:26:01 UTC 2010 builds@b8.netbsd.org:/home/builds/ab/netbsd-5-1-RC3/amd64/201006130031Z-obj/home/builds/ab/netbsd-5-1-RC3/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	date -r overflows
>How-To-Repeat:
	date -r `echo '2^31-1'|bc` ; date -r `echo '2^31'|bc`
>Fix:


>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: jakllsch@NetBSD.org
State-Changed-When: Tue, 07 Aug 2012 22:45:24 +0000
State-Changed-Why:
This behavior is expected of all POSIX-like OSes with an int32_t time_t.
Furthermore, NetBSD switched to an int64_t time_t sometime after NetBSD-5, where this particular overflow is gone.  The int64_t time_t change is too invasive for backporting to NetBSD-5.  Your attention to detail is appreciated.


From: Michael Cheponis <Michael@Cheponis.Com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/46782 (date -r overflows)
Date: Tue, 7 Aug 2012 16:45:01 -0700

 --f46d0447850f64e75b04c6b59608
 Content-Type: text/plain; charset=ISO-8859-1

 THANK YOU for your extra-rapid response, which is very clear and make very
 much sense.  I should have suspected it would have been taken care of, but,
 in the past, I've been encouraged to submit a pr if I don't with a little
 looking around see that the issue has been solved.

 Thanks again!

 (Also, I appreciate your volunteering for the project.  Sometimes
 volunteers don't know just how much we "in the field" appreciate all of
 your work.  I certainly appreciate it!)

 -Mike


 On Tue, Aug 7, 2012 at 3:45 PM, <jakllsch@netbsd.org> wrote:

 > Synopsis: date -r overflows
 >
 > State-Changed-From-To: open->closed
 > State-Changed-By: jakllsch@NetBSD.org
 > State-Changed-When: Tue, 07 Aug 2012 22:45:24 +0000
 > State-Changed-Why:
 > This behavior is expected of all POSIX-like OSes with an int32_t time_t.
 > Furthermore, NetBSD switched to an int64_t time_t sometime after NetBSD-5,
 > where this particular overflow is gone.  The int64_t time_t change is too
 > invasive for backporting to NetBSD-5.  Your attention to detail is
 > appreciated.
 >
 >
 >
 >

 --f46d0447850f64e75b04c6b59608
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable

 THANK YOU for your extra-rapid response, which is very clear and make very =
 much sense. =A0I should have suspected it would have been taken care of, bu=
 t, in the past, I&#39;ve been encouraged to submit a pr if I don&#39;t with=
  a little looking around see that the issue has been solved.<div>

 <br></div><div>Thanks again! =A0=A0</div><div><br></div><div>(Also, I appre=
 ciate your volunteering for the project. =A0Sometimes volunteers don&#39;t =
 know just how much we &quot;in the field&quot; appreciate all of your work.=
  =A0I certainly appreciate it!)</div>

 <div><br></div><div>-Mike</div><div><br><br><div class=3D"gmail_quote">On T=
 ue, Aug 7, 2012 at 3:45 PM,  <span dir=3D"ltr">&lt;<a href=3D"mailto:jaklls=
 ch@netbsd.org" target=3D"_blank">jakllsch@netbsd.org</a>&gt;</span> wrote:<=
 br>
 <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
 x #ccc solid;padding-left:1ex">
 Synopsis: date -r overflows<br>
 <br>
 State-Changed-From-To: open-&gt;closed<br>
 State-Changed-By: jakllsch@NetBSD.org<br>
 State-Changed-When: Tue, 07 Aug 2012 22:45:24 +0000<br>
 State-Changed-Why:<br>
 This behavior is expected of all POSIX-like OSes with an int32_t time_t.<br=
 >
 Furthermore, NetBSD switched to an int64_t time_t sometime after NetBSD-5, =
 where this particular overflow is gone. =A0The int64_t time_t change is too=
  invasive for backporting to NetBSD-5. =A0Your attention to detail is appre=
 ciated.<br>


 <br>
 <br>
 <br>
 </blockquote></div><br></div>

 --f46d0447850f64e75b04c6b59608--

From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/46782: date -r  (8) returns incorrect values
Date: Tue, 7 Aug 2012 23:03:11 -0400

 On Tue,  7 Aug 2012 22:35:00 +0000 (UTC)
 mac@SS.Culver.Net wrote:

 > >Description:
 > 	date -r overflows
 > >How-To-Repeat:
 > 	date -r `echo '2^31-1'|bc` ; date -r `echo '2^31'|bc`
 > >Fix:

 Could this be because on NetBSD versions prior to 6, time_t was
 int32_t?  It is int64_t on netbsd-6 and I cannot reproduce this
 problem on it.

 Thanks,
 -- 
 Matt

From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/46782: date -r  (8) returns incorrect values
Date: Tue, 7 Aug 2012 23:04:52 -0400

 Please ignore my previous comment, I missed the follow-up messages
 which were somehow not properly threaded in my mail client.

 Thanks,
 -- 
 Matt

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: bin/46782: date -r  (8) returns incorrect values
Date: Wed, 8 Aug 2012 03:34:56 -0400

 On Aug 7, 10:35pm, mac@SS.Culver.Net (mac@SS.Culver.Net) wrote:
 -- Subject: bin/46782: date -r  (8) returns incorrect values

 NetBSD-6 has 64 bit time_t.

 date -r `echo '2^31-1'|bc` ; date -r `echo '2^31'|bc`
 Tue Jan 19 05:14:07 EET 2038
 Tue Jan 19 05:14:08 EET 2038

 christos

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.