GNU bug report logs - #62216
Odd file corruption in clojure mode and emacs 30 HEAD

Previous Next

Package: emacs;

Reported by: Jonathon McKitrick <jcm <at> SDF.ORG>

Date: Thu, 16 Mar 2023 04:27:02 UTC

Severity: normal

Full log


Message #35 received at 62216 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jonathon McKitrick <jcm <at> SDF.ORG>, Po Lu <luangruo <at> yahoo.com>,
 Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 62216 <at> debbugs.gnu.org
Subject: Re: bug#62216: Narrowed the issue to one line
Date: Sun, 20 Aug 2023 18:26:33 +0300
> Date: Sun, 20 Aug 2023 13:38:26 +0000
> From:  Jonathon McKitrick via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.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.

Po Lu, Paul: any idea why that could be the case in the OP's scenario?
The only thing that comes to my mind is some weirdness of the OP's
filesystem.




This bug report was last modified 1 year and 293 days ago.

Previous Next


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