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: Ignoring failures and altering behavior


On 10/17/18 3:36 AM, Florian Weimer wrote:
Should we keep running at
all cost, possibly giving quite different results, or is it better to
actually report the errors we encounter and stop?

Here's an example I'm familiar with. When localtime runs out of memory, it could return NULL with errno == ENOMEM; but in practice glibc localtime, like that of many (most?) C libraries, defaults to UTC and keeps going even though the resulting values are incorrect. If glibc localtime switched to returning NULL in this situation, I imagine a lot of (unportable and incorrect) user code will stop working when memory gets low; on the other hand, some portable and correct user code will start working better. Should we change localtime's behavior?


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