GNU bug report logs - #21380
25.0.50; GTK-induced segfault when scheduling timer from window-configuration-change-hook

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> gmail.com>

Date: Sun, 30 Aug 2015 12:52:02 UTC

Severity: normal

Found in version 25.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #110 received at 21380 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rudalics <at> gmx.at, pipcet <at> gmail.com, 21380 <at> debbugs.gnu.org
Subject: Re: bug#21380: 25.0.50;
 GTK-induced segfault when scheduling timer from
 window-configuration-change-hook
Date: Sat, 05 Sep 2015 11:18:54 -0400
> I'm not sure I understand this plan.  Are you saying that consing a
> new list in timer--activate, instead of reusing an existing cell, will
> avoid the need to wok on a copy of the timer's list when invoking the
> timer callbacks?

That's the idea, yes.

> If so, I'm probably missing something here, because
> timer--activate will update the timer list variable anyway,

This is OK: by this time, we've already read this timer list variable so
changing it won't affect us.

> doesn't it mean the value of Vtimer_list in C seen by timer_check
> changes as well that very moment?

This setq would happen after we've read the variable, so it won't affect
timer_check.

> Not to mention the fact that with timers firing every several tens of
> ms, something we've seen while discussing these bugs, allocating a
> couple of cells each time might cause a lot of consing per second,
> which in turn causes GC, which slows down everything.

How could it be worse to allocate cells when we activate a timer than
copying the whole list every time we check the timers?


        Stefan




This bug report was last modified 3 years and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.