From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jonathon McKitrick via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62216: Odd file corruption in clojure mode and emacs 30 HEAD Date: Fri, 1 Sep 2023 01:17:21 +0000 Message-ID: References: <83jztpwx92.fsf@gnu.org> <875y58bv5w.fsf@yahoo.com> <83a5u8hh8k.fsf@gnu.org> <83o7incimo.fsf@gnu.org> Reply-To: Jonathon McKitrick Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35739"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, luangruo@yahoo.com, eggert@cs.ucla.edu, 62216@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 01 03:18:15 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qbsne-00094E-Ib for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Sep 2023 03:18:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbsnM-0004ZO-2F; Thu, 31 Aug 2023 21:17:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbsnJ-0004Yy-TJ for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 21:17:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbsnJ-00057Z-KA for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 21:17:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qbsnS-0001Pw-Ek for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 21:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jonathon McKitrick Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Sep 2023 01:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62216 X-GNU-PR-Package: emacs Original-Received: via spool by 62216-submit@debbugs.gnu.org id=B62216.16935310695426 (code B ref 62216); Fri, 01 Sep 2023 01:18:02 +0000 Original-Received: (at 62216) by debbugs.gnu.org; 1 Sep 2023 01:17:49 +0000 Original-Received: from localhost ([127.0.0.1]:59502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbsnE-0001PS-QV for submit@debbugs.gnu.org; Thu, 31 Aug 2023 21:17:49 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:50354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbsnC-0001PK-U8 for 62216@debbugs.gnu.org; Thu, 31 Aug 2023 21:17:47 -0400 Original-Received: from sdf.org (IDENT:jcm@sdf.org [205.166.94.16]) by mx.sdf.org (8.16.1/8.14.5) with ESMTPS id 3811HMm4002115 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Fri, 1 Sep 2023 01:17:33 GMT Original-Received: (from jcm@localhost) by sdf.org (8.16.1/8.12.8/Submit) id 3811HLnV026032; Fri, 1 Sep 2023 01:17:21 GMT Content-Disposition: inline In-Reply-To: <83o7incimo.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:268858 Archived-At: On Thu, Aug 31, 2023 at 06:54:23PM +0300, Eli Zaretskii wrote: : > Date: Thu, 31 Aug 2023 14:46:01 +0000 : > From: Jonathon McKitrick : > Cc: Eli Zaretskii , 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 : > : > > Cc: Jonathon McKitrick , Eli Zaretskii , Paul : > : > > Eggert , 62216@debbugs.gnu.org : > : > > Date: Wed, 30 Aug 2023 10:59:08 +0200 : > : > > : > : > > Po Lu writes: : > : > > : > : > > > Jonathon McKitrick 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. Ahhh! I didn't realize that's what that was, lol. I'll try a new build without my patch. Jonathon McKitrick -- 'My other computer is your Windows box.'