Date: Sun, 9 Nov 2008 01:56:54 GMT From: Vladimir Timfeev <vovkasm@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/128714: gmtime infinty loop Message-ID: <200811090156.mA91ussJ035663@www.freebsd.org> Resent-Message-ID: <200811090200.mA9208Uv037884@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 128714
>Category: misc
>Synopsis: gmtime infinty loop
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Nov 09 02:00:08 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Vladimir Timfeev
>Release: 6.2
>Organization:
>Environment:
FreeBSD zoo.rambler.ru 6.2-RELEASE-p1 FreeBSD 6.2-RELEASE-p1 #1: Thu Feb 15 17:00:27 MSK 2007 root@zoo.rambler.ru:/usr/obj/usr/src/sys/ZOO amd64
>Description:
On amd64 platforms (tested with 6.2 and 7.0).
gmtime from libc doesn't returns to program if called with arg < -33884019326476800
May be we should return NULL?
>How-To-Repeat:
Simple program to test... first call return, second - loop forever...
#include <time.h>
#include <stdio.h>
void test(time_t t) {
struct tm *date;
printf("try %ld\n",t);
date = gmtime(&t);
printf(" ok\n");
}
int main(void) {
time_t time_ok = -33884019326476800LL;
time_t time_err = -33884019326476801LL;
test(time_ok);
test(time_err);
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811090156.mA91ussJ035663>
