Subject: Re: bug#36431: Crash in marker.c:337

From: Stefan Monnier <[email-masked]>
Date: Sun, 30 Jun 2019 10:59:09 -0400

> AFAICT, this patch moves the call to move_gap_both from a fragment
> where we must decode the inserted text to a fragment where such a
> decoding might not be necessary.  If I'm right, then this makes
> insert-file-contents slower in some cases, because moving the gap
> might be very expensive with large buffers.

Indeed, that's one of the problems, but there are more serious
(correctness) problems with it anyway.

> More generally, I'd be leery to make significant changes ion
> insert-file-contents just to placate that single assertion.

I'm still trying to really understand what the code is doing, but so far
I get the impression that there are real bugs there, so I'm not really
concerned with resolving the assertion but with fixing those bugs.
Of course, to do that, I first need to understand the code (which maybe
will convince me that there aren't any bugs after all).

        Stefan