unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jonathon McKitrick via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 62216@debbugs.gnu.org
Subject: bug#62216: Narrowed the issue to one line
Date: Sun, 20 Aug 2023 13:38:26 +0000	[thread overview]
Message-ID: <ZOIXUp8V46gk9INm@SDF.ORG> (raw)
In-Reply-To: <ZBJcSLBKnq+7aRMH@SDF.ORG>

Progress!

This line is the culprit, around 4807:

ptrdiff_t trytry = min (gap_size, READ_BUF_SIZE);

When I replace it with this, from an older version:

ptrdiff_t trytry = min (total - inserted, READ_BUF_SIZE);

The problem disappears.

This change was made to address bug #9800, when inserting large files from /proc.

I don't understand the code well enough to understand why this change is causing the issue I'm seeing,
or if my 'fix' will break something else. I just know it's working for me and doesn't seem to cause issues otherwise.
However, it ignores 'gap_size', so I'm pretty sure that's not the correct way to fix this code.
Maybe it should be used 2 lines below? Again, I don't have the context to do anything but guess.

I'll keep testing locally, but I'd be interested in feedback on this change.

Jonathon McKitrick
--
'My other computer is your Linux box.'





  parent reply	other threads:[~2023-08-20 13:38 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16  0:01 bug#62216: Odd file corruption in clojure mode and emacs 30 HEAD Jonathon McKitrick
2023-03-16  6:50 ` Eli Zaretskii
2023-05-16 20:22   ` Jonathon McKitrick
2023-05-17 11:35     ` Eli Zaretskii
2023-07-27  1:42     ` Dmitry Gutov
2023-08-30  7:50       ` Gerd Möllmann
2023-08-30 11:20         ` Dmitry Gutov
2023-07-23 13:58 ` bug#62216: Narrowing down the issue Jonathon McKitrick via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-23 14:35   ` bug#62216: Odd file corruption in clojure mode and emacs 30 HEAD Eli Zaretskii
2023-07-25 10:09     ` Jonathon McKitrick via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-25 10:34     ` Jonathon McKitrick via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-20 13:38 ` Jonathon McKitrick via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-08-20 15:26   ` bug#62216: Narrowed the issue to one line Eli Zaretskii
2023-08-20 19:13     ` Paul Eggert
2023-08-20 19:19       ` Eli Zaretskii
2023-08-20 20:11         ` Paul Eggert
2023-08-20 22:21           ` Jonathon McKitrick via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-22 13:08           ` Jonathon McKitrick via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-22 14:10             ` Paul Eggert
2023-08-22 15:41               ` Eli Zaretskii
2023-08-22 23:29                 ` Paul Eggert
2023-08-21  8:43       ` Jonathon McKitrick via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-21  9:17       ` Jonathon McKitrick via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-21  9:29         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-30  8:59           ` bug#62216: Odd file corruption in clojure mode and emacs 30 HEAD Gerd Möllmann
2023-08-30 12:00             ` Eli Zaretskii
2023-08-30 12:07               ` Gerd Möllmann
2023-08-31 14:46                 ` Jonathon McKitrick via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-31 15:54                   ` Eli Zaretskii
2023-09-01  1:17                     ` Jonathon McKitrick via Bug reports for GNU Emacs, the Swiss army knife of text editors

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZOIXUp8V46gk9INm@SDF.ORG \
    --to=bug-gnu-emacs@gnu.org \
    --cc=62216@debbugs.gnu.org \
    --cc=jcm@SDF.ORG \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).