[Bug time/21716] Crash in glibc's mktime in low-memory situations

sourceware at sagamusix dot de sourceware-bugzilla@sourceware.org
Sun Sep 9 10:28:00 GMT 2018


https://sourceware.org/bugzilla/show_bug.cgi?id=21716

--- Comment #4 from Johannes <sourceware at sagamusix dot de> ---
Sadly I currently don't have a whole lot time to compile my own glibc (and the
bug is very hard to trigger, because now that glibc changed, a different memory
limit might be needed to trigger it), but I tried to read through tzfile.c and
the patch for some more comments.
There are actually two instances of "assert (num_types == 1);" in the file
(sorry for not being clear on that), and I suspect that both of them need to be
guarded against this kind of OOM situation. The crash that I initially reported
was in the assertion around line 750, while your patch seems to address the
assertion at around line 440. My original analysis on the Debian bug tracker
shows that there are three code paths that are expected to set the __tzname
pointers to a non-null value before the assertion is reached, so it might be
the case that of those instances need to be checked manually.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list