From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#12447: 24.1.50; Stuck in garbage collection on OS X Date: Sun, 16 Sep 2012 16:47:40 +0300 Message-ID: <83txuyqdtv.fsf@gnu.org> References: <505598C8.8070904@yandex.ru> <834nmys1ht.fsf@gnu.org> <5055AD8E.5020309@yandex.ru> <83zk4qqj4d.fsf@gnu.org> <5055C0EB.3040908@yandex.ru> <83wqzuqgzr.fsf@gnu.org> <5055D34F.1040800@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1347803288 16838 80.91.229.3 (16 Sep 2012 13:48:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Sep 2012 13:48:08 +0000 (UTC) Cc: 12447@debbugs.gnu.org, hanche@math.ntnu.no To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 16 15:48:10 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TDFCb-0006xG-O6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Sep 2012 15:48:01 +0200 Original-Received: from localhost ([::1]:32854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDFCX-0007uh-La for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Sep 2012 09:47:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDFCU-0007ub-TC for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2012 09:47:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDFCT-0006Rh-Pi for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2012 09:47:54 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDFCT-0006Rd-MA for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2012 09:47:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TDFDa-0005Wb-31 for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2012 09:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Sep 2012 13:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12447 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12447-submit@debbugs.gnu.org id=B12447.134780333621225 (code B ref 12447); Sun, 16 Sep 2012 13:49:02 +0000 Original-Received: (at 12447) by debbugs.gnu.org; 16 Sep 2012 13:48:56 +0000 Original-Received: from localhost ([127.0.0.1]:36628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDFDU-0005WI-3r for submit@debbugs.gnu.org; Sun, 16 Sep 2012 09:48:56 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:39536) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDFDQ-0005W8-Pr for 12447@debbugs.gnu.org; Sun, 16 Sep 2012 09:48:54 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MAG00E003NDUG00@a-mtaout22.012.net.il> for 12447@debbugs.gnu.org; Sun, 16 Sep 2012 16:47:40 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAG00DQ43NCW4S0@a-mtaout22.012.net.il>; Sun, 16 Sep 2012 16:47:36 +0300 (IDT) In-reply-to: <5055D34F.1040800@yandex.ru> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:64421 Archived-At: > Date: Sun, 16 Sep 2012 17:25:35 +0400 > From: Dmitry Gutov > CC: hanche@math.ntnu.no, 12447@debbugs.gnu.org > > > idle_timers = Vtimer_idle_list; > > Done that, recompiled, no difference in the example a sent previously. > Exactly because, I think, of the control flow you describe below: > > >> But no, it probably won't: the "guilty" commit made timer_check_2 > >> actually return 0 after a timer fires (keeping true to the comment above > >> it), so a local copy would serve no purpose. > > > > timer_check_2 indeed returns, but then timer_check will call it again, > > because it continues calling timer_check_2 in a loop, until there's no > > ripe timer. > > Each time timer_check_2 is called, a new copy would be made from the > idle timers list, so the newly created timer would be reached during the > same call to 'timer_check'. But the first time timer_check_2 encounters an un-ripe timer, or gets to the end of the list of timers, it returns a non-zero 'nexttime' value, which should break the loop in timer_check. Why isn't this happening? Perhaps the problem is that the value of 'difference' is not initialized: while (CONSP (timers) || CONSP (idle_timers)) { Lisp_Object timer = Qnil, idle_timer = Qnil; EMACS_TIME timer_time, idle_timer_time; EMACS_TIME difference; <<<<<<<<<<<<<<<<<<<<<<<<<<<< and then never set to any specific value, until here: else /* When we encounter a timer that is still waiting, return the amount of time to wait before it is ripe. */ { UNGCPRO; return difference; } which causes us return garbage, potentially zero, to timer_check.