Subject: Re: bug#21380: 25.0.50; GTK-induced segfault when scheduling timer from window-configuration-change-hook

From: Pip Cet <[email-masked]>
Date: Tue, 1 Sep 2015 15:22:58 +0000

On Tue, Sep 1, 2015 at 3:03 PM, Eli Zaretskii <[email-masked]> wrote:

> > Date: Tue, 1 Sep 2015 10:20:11 +0000
> > From: Pip Cet <[email-masked]>
> > Cc: [email-masked]
> >
> >     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.