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#21380: 25.0.50; GTK-induced segfault when scheduling timer from window-configuration-change-hook Date: Tue, 01 Sep 2015 18:03:47 +0300 Message-ID: <83fv2ychbg.fsf@gnu.org> References: <83mvx8252m.fsf@gnu.org> <83k2sc20k6.fsf@gnu.org> <83h9ng1ryx.fsf@gnu.org> <83a8t71qct.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1441119863 31561 80.91.229.3 (1 Sep 2015 15:04:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Sep 2015 15:04:23 +0000 (UTC) Cc: 21380@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 01 17:04:13 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 1ZWn6a-0000Ur-MN for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Sep 2015 17:04:12 +0200 Original-Received: from localhost ([::1]:54888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWn6a-0001vY-1a for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Sep 2015 11:04:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWn6V-0001vC-2a for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2015 11:04:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWn6Q-0002Hr-OJ for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2015 11:04:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWn6Q-0002Hh-Lx for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2015 11:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZWn6Q-0005rt-7U for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2015 11:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Sep 2015 15:04:02 +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.144111982822538 (code B ref 21380); Tue, 01 Sep 2015 15:04:02 +0000 Original-Received: (at 21380) by debbugs.gnu.org; 1 Sep 2015 15:03:48 +0000 Original-Received: from localhost ([127.0.0.1]:45214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZWn67-0005rP-Ou for submit@debbugs.gnu.org; Tue, 01 Sep 2015 11:03:47 -0400 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:41461) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZWn61-0005rB-LV for 21380@debbugs.gnu.org; Tue, 01 Sep 2015 11:03:41 -0400 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NU000F006OIBH00@mtaout27.012.net.il> for 21380@debbugs.gnu.org; Tue, 01 Sep 2015 18:00:23 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NU000AP670NGP60@mtaout27.012.net.il>; Tue, 01 Sep 2015 18:00:23 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il 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:106043 Archived-At: > Date: Tue, 1 Sep 2015 10:20:11 +0000 > From: Pip Cet > Cc: 21380@debbugs.gnu.org > > Can you show a patch that fixes the original segfault in your use > case? > > Attached. Hmm... isn't that a kludge? Or am I missing something? I thought you intended to recalculate the length on each iteration? > I think we should fix three things: > - concat shouldn't rely on its argument remaining unchanged in length > - the timer list copy should happen with block_input/unblock_input wrapped > around it > - we shouldn't call do_pending_window_change from QUIT [already installed. > Thanks, martin!] > > Any one of these is enough to prevent the original segfault. All but the second > also prevent the bizarre-elisp-induced segfault I came up with later. I think we should make all of these changes. > I'm not sure whether the timer code in timer.el does anything to the > timer list that might count as dangerous, but that's possibly the > only legitimate Lisp user of timer-list. Indeed. And if it does something unsafe, we should fix that.