Today I have experienced a number of crashes in icq2000beta and Xemacs-21.2.45
on windows. Finally, I found the cause -- my Win2000 (with SP1) has set the
date to 3 Apr 2043 (first of April joke?).
The test case is (current-time-string '(35273 29735 377000))
According to debugger in Visual Studio, the error "Access Violation" occured in
the body of `current-time-string' (editfns.c, 1254) when it tries to determine
the length of the string that was returned by `ctime':
-------------------------------------------------------------------------------
/* ctime is documented as always returning a "\n\0"-terminated
26-byte American time string, but let's be careful anyways. */
for (len = 0; the_ctime[len] != '\n' && the_ctime[len] != '\0';
len++)
;
-------------------------------------------------------------------------------
The problem is that in this case `lisp_to_time' fails to convert lisp
representation of time to a value of time_t type. `ctime' is called with
pointer to -1 and returns an empty string "". Thus the supposition in comment
does not hold.
I'm not shure how to handle this exceptional situation and it seems a long way
till it really hurts.
Nick.