unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jonathon McKitrick <jcm@SDF.ORG>
Cc: gerd.moellmann@gmail.com, luangruo@yahoo.com, eggert@cs.ucla.edu,
	62216@debbugs.gnu.org
Subject: bug#62216: Odd file corruption in clojure mode and emacs 30 HEAD
Date: Thu, 31 Aug 2023 18:54:23 +0300	[thread overview]
Message-ID: <83o7incimo.fsf@gnu.org> (raw)
In-Reply-To: <ZPCnqeOMoQkgET3h@SDF.ORG> (message from Jonathon McKitrick on Thu, 31 Aug 2023 14:46:01 +0000)

> Date: Thu, 31 Aug 2023 14:46:01 +0000
> From: Jonathon McKitrick <jcm@SDF.ORG>
> Cc: Eli Zaretskii <eliz@gnu.org>, luangruo@yahoo.com, eggert@cs.ucla.edu,
>         62216@debbugs.gnu.org
> 
> On Wed, Aug 30, 2023 at 02:07:35PM +0200, Gerd Mllmann wrote:
> : On 30.08.23 14:00, Eli Zaretskii wrote:
> : > > From: Gerd Möllmann <gerd.moellmann@gmail.com>
> : > > Cc: Jonathon McKitrick <jcm@SDF.ORG>,  Eli Zaretskii <eliz@gnu.org>,  Paul
> : > >   Eggert <eggert@cs.ucla.edu>,  62216@debbugs.gnu.org
> : > > Date: Wed, 30 Aug 2023 10:59:08 +0200
> : > > 
> : > > Po Lu <luangruo@yahoo.com> writes:
> : > > 
> : > > > Jonathon McKitrick <jcm@SDF.ORG> writes:
> : > > > 
> : > > > > What's the best mechanism to log these values in emacs?
> : > > > 
> : > > > In this case, printf.
> : > > 
> : > > When I add this assumption:
> : > > 
> : > > modified   src/fileio.c
> : > > @@ -4805,8 +4805,11 @@ DEFUN ("insert-file-contents", Finsert_file_contents, Sinsert_file_contents,
> : > >   	/* 'try' is reserved in some compilers (Microsoft C).  */
> : > >   	ptrdiff_t trytry = min (gap_size, READ_BUF_SIZE);
> : > > +	ptrdiff_t trytry_old = min (total - inserted, READ_BUF_SIZE);
> : > >   	if (!NILP (end))
> : > >   	  trytry = min (trytry, total - inserted);
> : > > +	if (trytry != trytry_old)
> : > > +	  abort ();
> : > >   	if (!seekable && NILP (end))
> : > >   	  {
> : > > 
> : > > and make bootstrap, temacs aborts.
> : > > 
> : > > Can someone tell if this assumption should hold?
> : > 
> : > You expect READ_BUF_SIZE to never be greater than gap_size?
> : 
> : Don't know.  This is how I understood Jonathan's nail saying works with this
> : old code, doesn't work with this new code.
> 
> I'm willing to log some meaningful stats if that would help. Last time I logged these values, I was inundated with info, but if I could
> narrow it down to the most useful cases, I could log the relevant bits and report back.

you mean, the fix I installed on master yesterday didn't fix your
problem?  It did fix Gerd's problem.





  reply	other threads:[~2023-08-31 15:54 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 ` bug#62216: Narrowed the issue to one line Jonathon McKitrick via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-20 15:26   ` 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 [this message]
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=83o7incimo.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=62216@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=gerd.moellmann@gmail.com \
    --cc=jcm@SDF.ORG \
    --cc=luangruo@yahoo.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 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).