[tz] POSIX epoch in the news?

Guy Harris guy at alum.mit.edu
Sat Feb 13 04:08:04 UTC 2016


On Feb 12, 2016, at 7:28 PM, Paul Eggert <eggert at cs.ucla.edu> wrote:

> The bug reportedly affects only 64-bit platforms. Perhaps some part of the OS X boot process naively iterates from time stamps starting from 1970 up through "now", and treats 1969-12-31 UTC as a very large (perhaps unsigned) time stamp.

$ egrep 'typedef.*clock_sec_t' xnu-3247.1.106/osfmk/kern/clock.h
typedef unsigned long           clock_sec_t;
typedef uint32_t                        clock_sec_t;
$ egrep 'typedef.*time_t' xnu-3247.1.106/bsd/i386/_types.h
typedef long                    __darwin_time_t;        /* time() */

Signed?  Unsigned?  Depends on what your code is including and how it's handling times; signed at the UNIX layer, but if you dive down into the bits of Mach that underlie some of the UNIX bits....


More information about the tz mailing list