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: Narrowed the issue to one line Date: Sun, 20 Aug 2023 13:38:26 +0000 Message-ID: References: Reply-To: Jonathon McKitrick Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40125"; mail-complaints-to="usenet@ciao.gmane.io" To: 62216@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 20 15:39:10 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 1qXie5-000AFf-NL for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Aug 2023 15:39:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXidy-0007e2-B6; Sun, 20 Aug 2023 09:39:02 -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 1qXidw-0007du-Nz for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 09:39:00 -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 1qXidw-00064Q-Fd for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 09:39:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qXidx-0006e6-W8 for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 09:39:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Jonathon McKitrick Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Aug 2023 13:39:01 +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.169253872025509 (code B ref 62216); Sun, 20 Aug 2023 13:39:01 +0000 Original-Received: (at 62216) by debbugs.gnu.org; 20 Aug 2023 13:38:40 +0000 Original-Received: from localhost ([127.0.0.1]:53342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXidc-0006dN-08 for submit@debbugs.gnu.org; Sun, 20 Aug 2023 09:38:40 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:57392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXidY-0006d9-Se for 62216@debbugs.gnu.org; Sun, 20 Aug 2023 09:38:37 -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 37KDcQE9013819 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for <62216@debbugs.gnu.org>; Sun, 20 Aug 2023 13:38:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=sdf.org; s=sdf.org; t=1692538713; bh=NbYoNm/jbt3kszcZbfi59fRQntGKBDHVpa1lSbC96mM=; h=Date:From:To:Subject; b=Cln+Wh7a6HAl+rP1EbVrLZdr6v0IkVQE0+wfQJDE0s1lkm93BfFc9DMiu4M03XaPm YTh70kAQZ3sC8jpxbwposuehXWrgnMlrtqgv0+1VZ/LnpBl8pj6ZxQcj+mhrDLceeM Ts5PzrHa1uYDXtkIOUslFit4+OnycOzRjuNuUtIE= Original-Received: (from jcm@localhost) by sdf.org (8.16.1/8.12.8/Submit) id 37KDcQqW010050 for 62216@debbugs.gnu.org; Sun, 20 Aug 2023 13:38:26 GMT Content-Disposition: inline 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:267996 Archived-At: 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.'