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 #101 received at 21380 <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 21380 <at> debbugs.gnu.org
Subject: Re: bug#21380: 25.0.50; GTK-induced segfault when scheduling timer
 from window-configuration-change-hook
Date: Wed, 2 Sep 2015 22:08:00 +0000
[Message part 1 (text/plain, inline)]
On Wed, Sep 2, 2015 at 7:13 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Date: Wed, 2 Sep 2015 16:09:53 +0000
> > From: Pip Cet <pipcet <at> gmail.com>
> > Cc: 21380 <at> debbugs.gnu.org
> >
> >     > I think it's safe to assume that Lisp timers are only checked if
> atimers
> >     are
> >     > enabled.
> >
> >     Those are two completely separate and independent features, so no,
> >     it's not safe to make that assumption. Not sure why you need to
> >     assume that, though.
> >
> > So we can call turn_on_atimers (true) without potentially enabling
> atimers in a
> > critical section.
>
> My confusion just grew a notch: one of these "atimers" is actually
> Lisp timers, right?


No, I don't think so.

If not, I'm afraid I don't see what you mean.
>

See below, those were two attempts of mine to describe the same thing.

> My assumption was that the reason we have both Lisp timers and atimers is
> that
> > atimers run strictly more often than Lisp timers.
>
> They can be more accurate, but I see no reason why they should run
> more often.
>

Sorry for being unclear. I should have said something like "have strictly
more opportunities to run than Lisp timers".


> >     > If it isn't, I think the best way forward is to write
> >     > block_input_and_atimers () and lock atimers with a counter just
> like
> >     input is.
> >
> >     Not sure I follow you. Are you saying that just calling block_input
> >     followed by turn_on_atimers is somehow not enough to prevent some
> Lisp
> >     from changing Vtimer_list under our feet?
> >
> >
> > I'm not saying that, no, but if another function disables atimers, then
> runs
> > Lisp timers, then does something critical that needs atimers to be
> disabled, it
> > might break.
>
> We didn't need to disable atimers until now, except when manipulating
> the atimers themselves.
>


> The function we are discussing, which copies
> Lisp timers, is the first one in need of this.  So I don't yet see the
> need for a counter, but I don't object to one, either.
>

That's how I feel about disabling atimers at all. I think it's only for
future atimer code that does something dangerous. Maybe I'm missing
something obvious, but there isn't currently any call path from the atimers
to Lisp code.
[Message part 2 (text/html, inline)]

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

Previous Next


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