[Ecls-list] segfault in DAYLIGHT-SAVING-TIME-P
Juan Jose Garcia Ripoll
lisp at arrakis.es
Tue Nov 15 11:16:06 UTC 2005
On Tue, 2005-11-15 at 16:53 +0100, Goffioul Michael wrote:
> > > (decode-universal-time 157768516)
> > Segmentation violation.
> > Broken at DECODE-UNIVERSAL-TIME.
> >
> > This problems happens for some specific given time range.
> > Debugging slightly
> > more, it appears that the crash occurs in
> > daylight-saving-time-p because
> > the localtime() call returned NULL. MSDN tells me that
> > localtime() returns
> > NULL if the time given as argument is before midnight,
> > January 1st, 1970.
>
> Further info: with the above time value, the UTC computed in
> daylight-saving-time-p is -1484, which is indeed before 01/01/1970-00:00,
> hence localtime() returns NULL.
I think I have fixed this. Now the way of computing daylight times is
slightly different, and to avoid problems with operating system limits
all dates are shifted into the 1970-2033 interval.
This should not be a big problem, since my feeling is that no operating
system returns reliable values for the daylight saving times outside
these years. SBCL plays a similar trick, too.
Regards,
Juanjo
More information about the ecl-devel
mailing list