On Tue, Sep 1, 2015 at 3:03 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Tue, 1 Sep 2015 10:20:11 +0000
> From: Pip Cet <pipcet@gmail.com>
> 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.