unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 21380@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <CAOqdjBdBxrxf3+9MaYuCRVTAP+HtTpCHg9Z2KruX8gjCKGSddg@mail.gmail.com> (raw)
In-Reply-To: <83y4goab2r.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2256 bytes --]

On Wed, Sep 2, 2015 at 7:13 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Wed, 2 Sep 2015 16:09:53 +0000
> > From: Pip Cet <pipcet@gmail.com>
> > Cc: 21380@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.

[-- Attachment #2: Type: text/html, Size: 3641 bytes --]

  reply	other threads:[~2015-09-02 22:08 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-30 12:51 bug#21380: 25.0.50; GTK-induced segfault when scheduling timer from window-configuration-change-hook Pip Cet
2015-08-30 15:01 ` Eli Zaretskii
2015-08-30 15:24   ` Pip Cet
2015-08-30 15:27     ` Pip Cet
2015-08-30 16:24       ` Pip Cet
2015-08-30 18:10         ` martin rudalics
2015-08-30 18:20           ` Pip Cet
2015-08-30 19:50             ` Eli Zaretskii
2015-08-30 18:59           ` Pip Cet
2015-08-31  9:20             ` martin rudalics
2015-08-30 16:39     ` Eli Zaretskii
2015-08-30 16:42       ` Pip Cet
2015-08-30 19:44         ` Eli Zaretskii
2015-08-30 20:56           ` Pip Cet
2015-08-30 21:13             ` Pip Cet
2015-08-31 14:31             ` Eli Zaretskii
2015-09-01 10:20               ` Pip Cet
2015-09-01 15:03                 ` Eli Zaretskii
2015-09-01 15:22                   ` Pip Cet
2015-09-01 16:01                     ` Eli Zaretskii
2015-09-01 16:02                       ` Pip Cet
2015-09-01 16:23                         ` Eli Zaretskii
2015-09-02  7:02                       ` martin rudalics
2015-09-02 14:32                         ` Eli Zaretskii
2015-09-03 15:36                         ` Stefan Monnier
2015-09-05  7:38                           ` Eli Zaretskii
2015-09-05 15:18                             ` Stefan Monnier
2015-09-05 15:27                               ` Eli Zaretskii
2015-09-06 22:11                                 ` Stefan Monnier
2022-04-29 12:52                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-29 13:40                               ` Eli Zaretskii
2022-04-29 13:44                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-29 15:02                                   ` Pip Cet
2015-09-05 16:59                           ` Pip Cet
2015-09-06 22:22                             ` Stefan Monnier
2015-09-08 15:55                               ` Pip Cet
2015-09-01 15:14                 ` Pip Cet
2015-09-01 16:04                   ` Eli Zaretskii
2015-09-01 16:56                     ` Pip Cet
2015-09-01 17:19                       ` Eli Zaretskii
2015-09-01 20:48                         ` Pip Cet
2015-09-02 15:08                           ` Eli Zaretskii
2015-09-02 16:09                             ` Pip Cet
2015-09-02 19:13                               ` Eli Zaretskii
2015-09-02 22:08                                 ` Pip Cet [this message]
2020-09-07 17:07                           ` Lars Ingebrigtsen
2020-09-07 17:47                             ` Pip Cet
2020-09-07 19:09                             ` Eli Zaretskii
2020-09-08  9:57                               ` Lars Ingebrigtsen
2022-04-29 12:14                                 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOqdjBdBxrxf3+9MaYuCRVTAP+HtTpCHg9Z2KruX8gjCKGSddg@mail.gmail.com \
    --to=pipcet@gmail.com \
    --cc=21380@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).