From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Charles A. Roelli" Newsgroups: gmane.emacs.bugs Subject: bug#27706: MacOS: decode-time hang Date: Sat, 15 Jul 2017 16:19:39 +0200 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1500128476 18680 195.159.176.226 (15 Jul 2017 14:21:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Jul 2017 14:21:16 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 To: 27706@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 15 16:21:07 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWNwQ-0004F5-7A for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Jul 2017 16:21:06 +0200 Original-Received: from localhost ([::1]:42273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWNwV-0001rZ-Hg for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Jul 2017 10:21:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWNwQ-0001rJ-6y for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 10:21:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWNwN-0007Ku-0g for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 10:21:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37791) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dWNwM-0007KU-Sn for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 10:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dWNwM-0005VP-K3 for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 10:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Charles A. Roelli" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jul 2017 14:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27706 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150012840221069 (code B ref -1); Sat, 15 Jul 2017 14:21:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Jul 2017 14:20:02 +0000 Original-Received: from localhost ([127.0.0.1]:40468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWNvO-0005Tk-Av for submit@debbugs.gnu.org; Sat, 15 Jul 2017 10:20:02 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWNvN-0005TD-9Y for submit@debbugs.gnu.org; Sat, 15 Jul 2017 10:20:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWNvG-0006pF-R1 for submit@debbugs.gnu.org; Sat, 15 Jul 2017 10:19:55 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:54300) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dWNvG-0006pB-O8 for submit@debbugs.gnu.org; Sat, 15 Jul 2017 10:19:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWNvF-0001kC-Ep for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 10:19:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWNvC-0006nG-95 for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 10:19:53 -0400 Original-Received: from [195.159.176.226] (port=48028 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dWNvC-0006me-3p for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 10:19:50 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dWNv3-0008IH-7f for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 16:19:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 88 Original-X-Complaints-To: usenet@blaine.gmane.org X-Mozilla-News-Host: news://news.gmane.org:119 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134588 Archived-At: Evaluating the following form on my system (macOS 10.6) results in a hang from Emacs 23 to master: (decode-time '(-1034058203136 0)) [other values around -1034058203136 don't cause an issue] The stack trace (stuck in macOS' libc, I think): (gdb) bt full #0 0x00007fff83860aef in timesub () from /usr/lib/libSystem.B.dylib No symbol table info available. #1 0x00007fff8386081c in _st_localsub () from /usr/lib/libSystem.B.dylib No symbol table info available. #2 0x00007fff83869d71 in localtime_r () from /usr/lib/libSystem.B.dylib No symbol table info available. #3 0x00000001004586c7 in localtime_rz (tz=0x10210bba0, t=0x7fff5fbf8d20, tm=0x7fff5fbf8ce8) at time_rz.c:296 abbr_saved = false old_tz = 0x1 #4 0x00000001002ba08b in emacs_localtime_rz (tz=0x10210bba0, t=0x7fff5fbf8d20, tm=0x7fff5fbf8ce8) at editfns.c:103 No locals. #5 0x00000001002c2680 in Fdecode_time (specified_time=..., zone=...) at editfns.c:2163 time_spec = -67768038400720896 gmt_tm = { tm_sec = 1606388960, tm_min = 32767, tm_hour = 1766166, tm_mday = 1, tm_mon = 0, tm_year = 0, tm_wday = 0, tm_yday = 0, tm_isdst = 0, tm_gmtoff = 10261984, tm_zone = 0x7fff5fbf8d30 "`\215\277_\377\177" } tz = 0x10210bba0 local_tm = { tm_sec = 24, tm_min = 38, tm_hour = 8, tm_mday = 32767, tm_mon = 0, tm_year = 0, tm_wday = 0, tm_yday = 0, tm_isdst = 0, tm_gmtoff = 0, tm_zone = 0x0 } tm = 0x0 tm_year_base = 0 The form is called when compiling the new org-timer.el, which requires org-clock.el, which itself contains this call that causes the issue: (defconst org-clock--oldest-date (let* ((dichotomy (lambda (min max pred) (if (funcall pred min) min (cl-incf min) (while (> (- max min) 1) (let ((mean (+ (ash min -1) (ash max -1) (logand min max 1)))) (if (funcall pred mean) (setq max mean) (setq min mean))))) max)) (high (funcall dichotomy most-negative-fixnum 0 (lambda (m) (ignore-errors (decode-time (list m 0)))))) (low (funcall dichotomy most-negative-fixnum 0 (lambda (m) (ignore-errors (decode-time (list high m))))))) (list high low)) "Internal time for oldest date representable on the system.") As a result, "make" hangs for me, so I delete org-timer.el locally to get around the problem for now. But I'd like to find a more permanent solution to make sure this doesn't happen elsewhere. Can anyone reproduce this under macOS, and if so, under which macOS version? I'd like to know which versions might need a fix for this problem.