On 2024-02-05 05:41, Bruno Haible wrote:
Bjarni Ingi Gislason wrote:
   "ctime" is not used in "groff".
Indeed, it was replaced with a call to 'asctime' in
https://git.savannah.gnu.org/gitweb/?p=groff.git;a=commitdiff;h=d7bbfb04ea25a82a8597cdef6ebb391cb78ab47c

Unfortunately asctime suffers from many of the undefined-behavior problems of ctime. On my platform, current groff dumps core if SOURCE_DATE_EPOCH=9223372036854775807 in the environment, and this is because groff mistakenly assumes gmtime always succeeds (it doesn't) and that asctime always has well-defined behavior if gmtime succeeds (it doesn't).

groff should not call asctime, for the same reason it shouldn't call ctime.

asctime is also deprecated in C23, and this is for good reason.

Reply via email to