bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30738: Invalid timezone (tzalloc failure) treated as out-of-memory


From: Valery Ushakov
Subject: bug#30738: Invalid timezone (tzalloc failure) treated as out-of-memory
Date: Mon, 19 Mar 2018 19:29:43 +0300
User-agent: Mutt/1.9.2 (2017-12-15)

On Thu, Mar 15, 2018 at 09:43:20 -0700, Paul Eggert wrote:

> On 03/12/2018 12:10 PM, Valery Ushakov wrote:
> > -  else if (EQ (zone, Qt))
> > +  else if (EQ (zone, Qt)
> > +      || (INTEGERP (zone) && XINT (zone) == 0))
> 
> Thanks for diagnosing the problem. If I understand things correctly, we can
> do a more-general fix, which should work for any used-in-practice time zone
> that is an integer hour offset from UTC. I installed the attached patch into
> master; please give it a try.

Sorry, I still haven't got around to test it, but I used exactly the
same approach with Etc/GMT* zones as a kludge when I first ran into
this problem and needed a working emacs asap.  I'll try to actually
test your patch this week.

I'd say special casing 0 is still a good idea as it saves a call to
tzalloc().  I also suspect that zone == 0 from parsed-time-string is
the most common case.

-uwe





reply via email to

[Prev in Thread] Current Thread [Next in Thread]