From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#12447: 24.1.50; Stuck in garbage collection on OS X Date: Sun, 16 Sep 2012 19:56:11 +0400 Message-ID: <5055F69B.4020004@yandex.ru> 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> <83txuyqdtv.fsf@gnu.org> <5055E16E.1070604@yandex.ru> <83sjaiqaqb.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347811022 8653 80.91.229.3 (16 Sep 2012 15:57:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Sep 2012 15:57:02 +0000 (UTC) Cc: 12447@debbugs.gnu.org, hanche@math.ntnu.no To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 16 17:57:02 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 1TDHDR-00025J-8w for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Sep 2012 17:57:01 +0200 Original-Received: from localhost ([::1]:53898 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDHDN-0000r3-5Y for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Sep 2012 11:56:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDHDK-0000qw-GK for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2012 11:56:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDHDJ-0003A4-Bd for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2012 11:56:54 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDHDJ-0003A0-8I for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2012 11:56:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TDHEQ-0000Bd-4Z for bug-gnu-emacs@gnu.org; Sun, 16 Sep 2012 11:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Sep 2012 15:58: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.1347811045657 (code B ref 12447); Sun, 16 Sep 2012 15:58:02 +0000 Original-Received: (at 12447) by debbugs.gnu.org; 16 Sep 2012 15:57:25 +0000 Original-Received: from localhost ([127.0.0.1]:37393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDHDo-0000AX-R9 for submit@debbugs.gnu.org; Sun, 16 Sep 2012 11:57:25 -0400 Original-Received: from forward4.mail.yandex.net ([77.88.46.9]:42473) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDHDl-0000AN-4A for 12447@debbugs.gnu.org; Sun, 16 Sep 2012 11:57:24 -0400 Original-Received: from smtp3.mail.yandex.net (smtp3.mail.yandex.net [77.88.46.103]) by forward4.mail.yandex.net (Yandex) with ESMTP id 07C641BC136F; Sun, 16 Sep 2012 19:56:09 +0400 (MSK) Original-Received: from smtp3.mail.yandex.net (localhost [127.0.0.1]) by smtp3.mail.yandex.net (Yandex) with ESMTP id C3EB61BA03B7; Sun, 16 Sep 2012 19:56:09 +0400 (MSK) Original-Received: from 5x166x246x245.dynamic.spb.ertelecom.ru (5x166x246x245.dynamic.spb.ertelecom.ru [5.166.246.245]) by smtp3.mail.yandex.net (nwsmtp/Yandex) with ESMTP id u9MqDcPJ-u9M4jVOo; Sun, 16 Sep 2012 19:56:09 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1347810969; bh=TGBmsoqovyZey9T8isfK5PBe0XXqKVDtgIb3UsPzKwA=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=PlK3UglmML5VsWRqwTs21V19uIg8fd27WfvONVSNTpmbMUqkoHwm74bhN2C1sgv7O eaI96OFSEAdhoIIoaDYFdI3czF1KTe0Ia1n1JZf+67UoHgoBIYEAOMpbDDRy1ULpTZ PUfCFyBjQ6lKlg4rKCY1x6alMlDfiXkIaT9ZEUIM= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 In-Reply-To: <83sjaiqaqb.fsf@gnu.org> 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:64432 Archived-At: On 16.09.2012 18:54, Eli Zaretskii wrote: >> Date: Sun, 16 Sep 2012 18:25:50 +0400 >> From: Dmitry Gutov >> CC: hanche@math.ntnu.no, 12447@debbugs.gnu.org >> >>> 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. >> >> It's assigned to, though. When we encounter a timer that's not yet ripe. > > What if all of them are ripe? I don't see the problem. The first timer is ripe? Fire it and return 'nexttime'. Otherwise, return 'difference', which now has been assigned a value. If we've reached the end of the list, again return 'nexttime', which is initialized with invalid_emacs_time () at the beginning of timer_check_2. Anyway, I think the immediate problem is that the newly created timer can be considered ripe.