--- Begin Message ---
Subject: |
Invalid timezone (tzalloc failure) treated as out-of-memory |
Date: |
Wed, 7 Mar 2018 01:53:46 +0300 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
Emacs 25 treats tzalloc(3) failure as out-of-memory condition.
E.g. when an invalid timezone is specified, it fails to start with:
$ TZ=FOOBAR emacs -nw
emacs: Memory exhausted--use M-x save-some-buffers then exit and restart Emacs
The code in tzlookup() also assumes that tzalloc(3) understands the
direct zone specification in the name/offset format. I haven't
checked tzcode history, but this support is only a few years old
(around 2014, I'd estimate). E.g. NetBSD-6 has older tzcode(3) that
doesn't support this feature. This leads to a lot of "Memory
exhausted" errors when trying to use e.g. vc.el
"encode-time" (0xffffa2d4)
"apply" (0xffffa3fc)
"vc-cvs-parse-entry" (0xffffa718)
"vc-cvs-registered" (0xffffa9b0)
"progn" (0xffffab44)
"if" (0xffffac24)
"vc-cvs-registered" (0xffffae7c)
"apply" (0xffffae78)
"vc-call-backend" (0xffffb188)
0x1c65360 PVEC_COMPILED
"mapc" (0xffffb5c8)
"vc-registered" (0xffffb8d8)
"vc-backend" (0xffffbbe8)
"vc-refresh-state" (0xffffbfa0)
"run-hooks" (0xffffc08c)
"after-find-file" (0xffffc3b4)
...
-uwe
--- End Message ---
--- Begin Message ---
Subject: |
Re: Invalid timezone (tzalloc failure) treated as out-of-memory |
Date: |
Sun, 11 Mar 2018 00:33:03 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
[resending, I hope to the right place this time]
Thanks for reporting the problem. I have installed the attached two patches,
which I think should fix the problem so I'm closing the bug report. Please give
them a try on NetBSD (as I typically don't use NetBSD).
0001-Fix-minor-timezone-memory-leak.patch
Description: Text Data
0001-Port-to-NetBSD-tzalloc.patch
Description: Text Data
--- End Message ---