public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/13148] New: localtime doesn't support more than 67768036191705599 seconds
@ 2011-09-01 20:01 hjl.tools at gmail dot com
2011-09-01 20:04 ` [Bug libc/13148] " hjl.tools at gmail dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2011-09-01 20:01 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13148
Bug #: 13148
Summary: localtime doesn't support more than 67768036191705599
seconds
Product: glibc
Version: 2.14
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper.fsp@gmail.com
ReportedBy: hjl.tools@gmail.com
Classification: Unclassified
On Linux/x86-64, I got
[hjl@gnu-mic-1 lfs-1]$ cat foo.c
#include <time.h>
#include <stdio.h>
static void
foo (time_t *tp)
{
struct tm *p = localtime (tp);
if (!p)
printf ("localtime (0x%lx) is NULL\n", *tp);
else
printf ("localtime (0x%lx): year: %d\n", *tp, p->tm_year);
}
int
main ()
{
time_t t;
t = 67768036191705599L;
foo (&t);
t++;
foo (&t);
return 0;
}
[hjl@gnu-mic-1 lfs-1]$ gcc foo.c
[hjl@gnu-mic-1 lfs-1]$ ./a.out
localtime (0xf0c2ab7c5519ff): year: 2147483647
localtime (0xf0c2ab7c551a00) is NULL
[hjl@gnu-mic-1 lfs-1]$
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libc/13148] localtime doesn't support more than 67768036191705599 seconds
2011-09-01 20:01 [Bug libc/13148] New: localtime doesn't support more than 67768036191705599 seconds hjl.tools at gmail dot com
@ 2011-09-01 20:04 ` hjl.tools at gmail dot com
2011-09-03 5:11 ` bugdal at aerifal dot cx
2014-06-27 12:11 ` fweimer at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2011-09-01 20:04 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13148
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-09-01 20:04:04 UTC ---
The problem is
int tm_year; /* year */
We get overflow at year 2147483648.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libc/13148] localtime doesn't support more than 67768036191705599 seconds
2011-09-01 20:01 [Bug libc/13148] New: localtime doesn't support more than 67768036191705599 seconds hjl.tools at gmail dot com
2011-09-01 20:04 ` [Bug libc/13148] " hjl.tools at gmail dot com
@ 2011-09-03 5:11 ` bugdal at aerifal dot cx
2014-06-27 12:11 ` fweimer at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: bugdal at aerifal dot cx @ 2011-09-03 5:11 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13148
Rich Felker <bugdal at aerifal dot cx> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugdal at aerifal dot cx
Resolution|WONTFIX |INVALID
--- Comment #2 from Rich Felker <bugdal at aerifal dot cx> 2011-09-03 05:10:44 UTC ---
This is not a bug. tm_year is required by the standard to have type int.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libc/13148] localtime doesn't support more than 67768036191705599 seconds
2011-09-01 20:01 [Bug libc/13148] New: localtime doesn't support more than 67768036191705599 seconds hjl.tools at gmail dot com
2011-09-01 20:04 ` [Bug libc/13148] " hjl.tools at gmail dot com
2011-09-03 5:11 ` bugdal at aerifal dot cx
@ 2014-06-27 12:11 ` fweimer at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-06-27 12:11 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=13148
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-27 12:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-01 20:01 [Bug libc/13148] New: localtime doesn't support more than 67768036191705599 seconds hjl.tools at gmail dot com
2011-09-01 20:04 ` [Bug libc/13148] " hjl.tools at gmail dot com
2011-09-03 5:11 ` bugdal at aerifal dot cx
2014-06-27 12:11 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).