From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#21380: 25.0.50; GTK-induced segfault when scheduling timer from window-configuration-change-hook Date: Tue, 1 Sep 2015 15:22:58 +0000 Message-ID: References: <83mvx8252m.fsf@gnu.org> <83k2sc20k6.fsf@gnu.org> <83h9ng1ryx.fsf@gnu.org> <83a8t71qct.fsf@gnu.org> <83fv2ychbg.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11481518060701051eb12022 X-Trace: ger.gmane.org 1441121000 20059 80.91.229.3 (1 Sep 2015 15:23:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Sep 2015 15:23:20 +0000 (UTC) Cc: 21380@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 01 17:23:12 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 1ZWnOw-00062m-Fj for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Sep 2015 17:23:10 +0200 Original-Received: from localhost ([::1]:55038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWnOw-0002Hd-00 for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Sep 2015 11:23:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWnOs-0002HU-6f for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2015 11:23:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWnOo-0005J0-T7 for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2015 11:23:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWnOo-0005It-PV for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2015 11:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZWnOo-0006IW-DD for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2015 11:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Sep 2015 15:23: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.144112098124196 (code B ref 21380); Tue, 01 Sep 2015 15:23:02 +0000 Original-Received: (at 21380) by debbugs.gnu.org; 1 Sep 2015 15:23:01 +0000 Original-Received: from localhost ([127.0.0.1]:45229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZWnOn-0006IC-5r for submit@debbugs.gnu.org; Tue, 01 Sep 2015 11:23:01 -0400 Original-Received: from mail-qk0-f179.google.com ([209.85.220.179]:35412) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZWnOl-0006I3-ID for 21380@debbugs.gnu.org; Tue, 01 Sep 2015 11:23:00 -0400 Original-Received: by qkcj187 with SMTP id j187so45013272qkc.2 for <21380@debbugs.gnu.org>; Tue, 01 Sep 2015 08:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=t1zfl2Y4ibimDDScJ2QMynn2QQBRAkPUDQvPT3bbjg4=; b=LhCBAQre7zr33VHEN8YItex61QfzPZj0XutRdsaIQcyOqD6B/XHDDEdhSlvVEl90de NaViKzYTkuGYdb/U788QmvdWQp+UNdMKO3/up8JPTriZWNDpAsgqKdZ3cVAkYHWYb+9J pVp51uEqNqyPIgnqcNB00y2mVyZ0s5uPkzNNdNAcIt/dsf/ESC51kLQMcqIKdTjno2QV 5NjWh+RWW39Ax4XqHLTgP/AkF9i6B/qqlnB1aBKowHhExTeGQyOeUEUYVqzGBsEmupxc 2FIe5TaK4spEnErMxgDVp1RblRSbY8bEEq014eVnEw2zCL99H5ePVIt4yU/L48sxAqZ2 YTKw== X-Received: by 10.13.202.66 with SMTP id m63mr27883858ywd.127.1441120978861; Tue, 01 Sep 2015 08:22:58 -0700 (PDT) Original-Received: by 10.37.74.200 with HTTP; Tue, 1 Sep 2015 08:22:58 -0700 (PDT) In-Reply-To: <83fv2ychbg.fsf@gnu.org> 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:106046 Archived-At: --001a11481518060701051eb12022 Content-Type: text/plain; charset=UTF-8 On Tue, Sep 1, 2015 at 3:03 PM, Eli Zaretskii wrote: > > 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? > It is. It replaces segfaults by incorrect results. Or am I missing something? I thought you > intended to recalculate the length on each iteration? > If you can think of a good way of doing that, I'd be grateful. I can't, because Flength calls QUIT, too, so there's no guarantee its results are still valid when it's done. All we could do, as far as I can see, is add an extra call to Flength() which will slow things down and sometimes but not always make the risky thing the user is attempting work. Other than that, a non-segfault with an incorrect result is all we can give the user, I fear. --001a11481518060701051eb12022 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Tue, Sep 1, 2015 at 3:03 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>=C2=A0 =C2=A0 =C2=A0Can you show a patch that fixes = the original segfault in your use
>=C2=A0 =C2=A0 =C2=A0case?
>
> Attached.

Hmm... isn't that a kludge?

It is. It replaces segfaults by incorrect results.
Or am I missing something?=C2=A0 I = thought you
intended to recalculate the length on each iteration?
=
If you can think of a good way of doing that, I'd be gra= teful. I can't, because Flength calls QUIT, too, so there's no guar= antee its results are still valid when it's done.

All we could do, as far as I can see, is add an extra call to Fleng= th() which will slow things down and sometimes but not always make the risk= y thing the user is attempting work. Other than that, a non-segfault with a= n incorrect result is all we can give the user, I fear.
--001a11481518060701051eb12022--