GNU bug report logs - #23397
25.0.92; assertion failure auto-reverting a file being overwritten

Previous Next

Package: emacs;

Reported by: Ken Raeburn <raeburn <at> permabit.com>

Date: Thu, 28 Apr 2016 22:07:01 UTC

Severity: normal

Tags: confirmed

Found in versions 26.1, 25.0.92

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: Ken Raeburn <raeburn <at> permabit.com>, Eli Zaretskii <eliz <at> gnu.org>, 23397 <at> debbugs.gnu.org
Subject: bug#23397: 25.0.92; assertion failure auto-reverting a file being overwritten
Date: Sat, 05 Sep 2020 16:03:54 +0200
Noam Postavsky <npostavs <at> gmail.com> writes:

> This seems to fix the scenario you gave in #17.  I don't quite
> understand what the overlap expression is trying to compute though.

[...]

> +      off_t file_end_pos = st.st_size;

[etc]

Eli Zaretskii <eliz <at> gnu.org> writes:

>> I don't quite understand what the overlap expression is trying to
>> compute though.
>
> It prevents us from re-using the same portion of buffer text for
> matching both at start and at end of the file.  This could happen,
> e.g., with buffers whose contents is the same character, and a file
> whose contents is mostly the same, but larger, and with a few
> different characters in the middle.  Then the "same_at_end" loop could
> inadvertently match a part of the buffer that was already matched by
> the "same_at_start" loop.
>
> The overlap expression computes the portion of the buffer that was
> matched by both "same_at_start" and "same_at_end" loops.

This was two years ago, but the patch doesn't seem to be applied?  It
was a rather obscure timing-related (but serious) bug.

Noam, did Eli's explanation help?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 340 days ago.

Previous Next


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