[PATCH v4] Ensure mktime sets errno on error (bug 23789)

Paul Eggert eggert@cs.ucla.edu
Wed Nov 7 00:28:00 GMT 2018


On 11/6/18 12:41 PM, Albert ARIBAUD wrote:
> Issue is that __mktime_internal exited through
>
>      else if (--remaining_probes == 0)
>        return -1;
>
> with errno never set.
>
> Any idea why?

Either localtime_r is failing without setting errno so the bug is in 
localtime_r, or localtime_r never fails and so never sets errno so the 
bug is in mktime. Can you check which of these is happening?



More information about the Libc-alpha mailing list