This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3] Y2038: make __mktime_internal compatibles with __time64_t


Hi Paul,

On Wed, 17 Oct 2018 18:44:05 -0700, Paul Eggert <eggert@cs.ucla.edu>
wrote :

> This patch looks OK to me, modulo the spelling fix.
> 
> In reviewing this patch I noticed a longstanding bug in mktime that 
> hasn't been reported. I just now reported it here:
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=23789
> 
> Fixing that bug may affect the patch.

Should I go and provide a fix to that bug, then, and resubmit my patch
over the fix?

Apparently the fix 'only' involves ensuring mktime() sets errno to
EOVERFLOW (as per Posix) if its call to __mktime_internal() returned -1.

In the case where neither _LIBC nor NEED_MKTIME_WORKING are defined,
"another" mktime() is called. Do we assume this other mktime will set
errno to EOVERFLOW, or do we do it too in that case?

Also, I assume tests would be needed for both cases where
__mktime_internal() returns -1? If so, I would need struct tm values
which trigger either one, or at least indications on how to find ones.

Cordialement,
Albert ARIBAUD
3ADEV


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]