From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#21380: 25.0.50; GTK-induced segfault when scheduling timer from window-configuration-change-hook Date: Sun, 06 Sep 2015 18:11:51 -0400 Message-ID: References: <83mvx8252m.fsf@gnu.org> <83k2sc20k6.fsf@gnu.org> <83h9ng1ryx.fsf@gnu.org> <83a8t71qct.fsf@gnu.org> <83fv2ychbg.fsf@gnu.org> <838u8qcenv.fsf@gnu.org> <55E69F07.9060006@gmx.at> <83a8t18gdu.fsf@gnu.org> <834mj89999.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441577550 5423 80.91.229.3 (6 Sep 2015 22:12:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Sep 2015 22:12:30 +0000 (UTC) Cc: pipcet@gmail.com, 21380@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 07 00:12:16 2015 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 1ZYiAU-0002a2-7O for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Sep 2015 00:12:10 +0200 Original-Received: from localhost ([::1]:50976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYiAT-00043B-H0 for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Sep 2015 18:12:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYiAP-00042z-Vu for bug-gnu-emacs@gnu.org; Sun, 06 Sep 2015 18:12:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYiAM-0006Pz-Le for bug-gnu-emacs@gnu.org; Sun, 06 Sep 2015 18:12:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYiAM-0006Pr-IQ for bug-gnu-emacs@gnu.org; Sun, 06 Sep 2015 18:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZYiAM-0000wl-1y for bug-gnu-emacs@gnu.org; Sun, 06 Sep 2015 18:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Sep 2015 22:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21380 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21380-submit@debbugs.gnu.org id=B21380.14415775153626 (code B ref 21380); Sun, 06 Sep 2015 22:12:01 +0000 Original-Received: (at 21380) by debbugs.gnu.org; 6 Sep 2015 22:11:55 +0000 Original-Received: from localhost ([127.0.0.1]:50973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYiAE-0000wP-9o for submit@debbugs.gnu.org; Sun, 06 Sep 2015 18:11:54 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:16854) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYiAC-0000wH-DQ for 21380@debbugs.gnu.org; Sun, 06 Sep 2015 18:11:53 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CbDQA731xV/xGkpUVcgxCEAsYTgk0EAgKBPDwRAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQHCxQYDSSINwjPIwEBAQEBBQEBAQEeizqFBQeELQEEnxeGaYsrghSBRSNhgVqBWSKCeAEBAQ X-IPAS-Result: A0CbDQA731xV/xGkpUVcgxCEAsYTgk0EAgKBPDwRAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQHCxQYDSSINwjPIwEBAQEBBQEBAQEeizqFBQeELQEEnxeGaYsrghSBRSNhgVqBWSKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="162692775" Original-Received: from 69-165-164-17.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.165.164.17]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 06 Sep 2015 18:11:52 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 5B71FAE042; Sun, 6 Sep 2015 18:11:51 -0400 (EDT) In-Reply-To: <834mj89999.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 05 Sep 2015 18:27:30 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106196 Archived-At: > What do you mean by "have read the variable"? We are "reading" it one > member at a time, as timer_check goes about its business. The Vtimer_list variable is read once and for all at the beginning of timer_check. After that, this variable is unused until we finish processing all the timers in the list. This processing uses the list that was contained in this variable, but it doesn't use the variable itself. So modifying the list during the loop can be problematic (hence the use of copy-sequence to avoid interference), whereas modifying the variable isn't. >> How could it be worse to allocate cells when we activate a timer than >> copying the whole list every time we check the timers? > Twice worse, I'd say (assuming "a couple" really means 2). What kind of scenario are you imagining. My reasoning I have in mind is this: - Every time Emacs is idle, it runs check_timers. - We don't run timers every time Emacs is idle (because it becomes un-idle before it gets a chance to run those timers). - Most commands don't activate timers (but they end by running check_timers). - Only some timers end up calling activate-timer. So, I get the impression that check_timers should be run (much?) more often than activate-timer. > But this is not the important issue right now. Right now, I don't > understand how your proposal will solve this and related bugs. Neither do I. But if replacing Fcopy_sequence by a new copy_sequence_without_QUIT fixes the bug, then I don't see why replacing it with a nop wouldn't fix it just as well. Stefan