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 1/1] Y2038: make __mktime_internal compatible with 64-bit-time


Hi Joseph,

On Tue, 19 Jun 2018 12:21:58 +0000, Joseph Myers
<joseph@codesourcery.com> wrote :

> On Tue, 19 Jun 2018, Albert ARIBAUD (3ADEV) wrote:
> 
> >    if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3)
> >      {
> > -      /* time_t isn't large enough to rule out overflows, so check
> > -	 for major overflows.  A gross check suffices, since if t0
> > +      /* __time64_t is large enough to rule out overflows, but check
> > +	 for major overflows anyway.  A gross check suffices, since if t0  
> 
> Are you sure it's coherent to have code in this file using a TIME_T_MAX 
> that's defined in terms of time_t, when the code is using __time64_t?  I'd 
> expect you to need to define TIME_T_MAX and TIME_T_MIN in terms of 
> __time64_t instead.

You're right, but it's actually worse than that :( I've used the wrong
local branch in creating this patch set. This one was taken halfway back
into the code and a lot of time_t are still in there. Apologies, will
re-post the right one as v2 as soon as I've proofread it.

> > +  __set_errno(EOVERFLOW);  
> 
> Missing space before '('.  You need to watch out for such issues 
> throughout the patch series.
> 
> > +  __set_errno(EOVERFLOW);  
> 
> Likewise.

Will fix.

Cordialement,
Albert ARIBAUD
3ADEV


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