From: Lars Ingebrigtsen <larsi@gnus.org>
To: Noam Postavsky <npostavs@gmail.com>
Cc: Ken Raeburn <raeburn@permabit.com>, 23397@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 [thread overview]
Message-ID: <87k0x848xh.fsf@gnus.org> (raw)
In-Reply-To: <87zhzutngf.fsf@gmail.com> (Noam Postavsky's message of "Sat, 16 Jun 2018 17:45:36 -0400")
Noam Postavsky <npostavs@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@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
prev parent reply other threads:[~2020-09-05 14:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 22:05 bug#23397: 25.0.92; assertion failure auto-reverting a file being overwritten Ken Raeburn
2016-05-02 16:47 ` Eli Zaretskii
2016-05-02 20:43 ` Ken Raeburn
2016-05-03 15:15 ` Eli Zaretskii
2016-05-03 21:04 ` Ken Raeburn
2018-06-16 21:45 ` Noam Postavsky
2018-06-17 5:36 ` Eli Zaretskii
2020-09-05 14:03 ` Lars Ingebrigtsen [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0x848xh.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=23397@debbugs.gnu.org \
--cc=npostavs@gmail.com \
--cc=raeburn@permabit.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.