From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#9800: Incomplete truncated file buffers from the /proc filesystem Date: Mon, 13 Feb 2023 12:47:33 -0800 Organization: UCLA Computer Science Department Message-ID: References: <877h40vb8h.fsf@mail.jurta.org> <4EA4D31B.4050604@cs.ucla.edu> <4EA5E08D.8070903@cs.ucla.edu> <861qmvcglp.fsf@aarsen.me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------c0Segc5XoTePSLcZgv2oSDi0" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38801"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Cc: rms@gnu.org, 9800-done@debbugs.gnu.org To: Arsen =?UTF-8?Q?Arsenovi=C4=87?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 13 21:48:16 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 1pRfkF-0009we-HI for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Feb 2023 21:48:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRfk7-0008Pj-KF; Mon, 13 Feb 2023 15:48:07 -0500 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 1pRfk2-0008Ni-CD for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 15:48:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRfk2-0005T6-3f for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 15:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRfk2-0007IM-0A for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 15:48:02 -0500 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Feb 2023 20:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 9800 X-GNU-PR-Package: emacs Mail-Followup-To: 9800@debbugs.gnu.org, eggert@cs.ucla.edu, juri@jurta.org Original-Received: via spool by 9800-done@debbugs.gnu.org id=D9800.167632126527929 (code D ref 9800); Mon, 13 Feb 2023 20:48:01 +0000 Original-Received: (at 9800-done) by debbugs.gnu.org; 13 Feb 2023 20:47:45 +0000 Original-Received: from localhost ([127.0.0.1]:51771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRfjk-0007GJ-EK for submit@debbugs.gnu.org; Mon, 13 Feb 2023 15:47:45 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:60054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRfjh-0007Fm-Mv for 9800-done@debbugs.gnu.org; Mon, 13 Feb 2023 15:47:42 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id CF3741600AE; Mon, 13 Feb 2023 12:47:35 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id y3RY3lWiykgA; Mon, 13 Feb 2023 12:47:33 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id CC62D1600AF; Mon, 13 Feb 2023 12:47:33 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.9.2 zimbra.cs.ucla.edu CC62D1600AF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=78364E5A-2AF3-11ED-87FA-8298ECA2D365; t=1676321253; bh=VMwRZFJ6HpfsbhK64tW9JEInCYnWlM1z4OQOx/bc2So=; h=Content-Type:Message-ID:Date:MIME-Version:To:From:Subject; b=RjFzpHlT1zsIozC+yE698SZwEM4gkbo9S39qksQ3SOtxVdEthqs4qOLoXiy5tC2bd UlBD0gJuY6DoJqIygXD7HGfs1D1t+3rHNXwX/ESMu9grw5chG5TcRqxjASoXRL1814 z4VIuaB1HcKdNlRD3u/gt3Szdar6NeEB+fsVeSFY= X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 11HkVAbV-jNC; Mon, 13 Feb 2023 12:47:33 -0800 (PST) Original-Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 8F54D1600AE; Mon, 13 Feb 2023 12:47:33 -0800 (PST) Content-Language: en-US In-Reply-To: <861qmvcglp.fsf@aarsen.me> 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:255527 Archived-At: This is a multi-part message in MIME format. --------------c0Segc5XoTePSLcZgv2oSDi0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2023-02-12 02:21, Arsen Arsenovi=C4=87 wrote: > ... or such. This approach is robust and general, and I suspect it'd > even work for named pipes. Although indeed robust and general and it will work with named pipes in=20 some cases, it still has a problem if the other side of the named pipe=20 outputs data very slowly: Emacs will still seem to hang until you type C-= g. That being said, the approach is an improvement and it fixes the=20 original bug report so I installed the attached and am boldly closing=20 the bug report (we can reopen it if I'm wrong). The last patch in the=20 attached series is the actual fix: the others are minor cleanups of this=20 messy area, which I discovered while looking into the fix. This patch does not address the abovementioned issue of named pipes, nor=20 the issue of inserting very large files: the code should behave roughly=20 the same as before in those two areas. These issues can be raised in=20 separate bug reports if needed. PS. I was surprised to see that Emacs master currently has several test=20 case failures on GNU/Linux (specifically the latest Fedora and Ubuntu=20 releases). I hope these are known and that people are working on them. 1 files did not finish: lisp/server-tests.log 4 files contained unexpected results: src/lread-tests.log lisp/international/mule-tests.log lisp/emacs-lisp/map-tests.log lisp/emacs-lisp/bytecomp-tests.log --------------c0Segc5XoTePSLcZgv2oSDi0 Content-Type: text/x-patch; charset=UTF-8; name="0001-Improve-insert-file-contents-checking.patch" Content-Disposition: attachment; filename="0001-Improve-insert-file-contents-checking.patch" Content-Transfer-Encoding: base64 RnJvbSA1Mjg0YWYyN2VlNTI1MGM2MzFmZjRlZTJmM2Q4NjgyZjBjNWRmOGJjIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBTdW4sIDEyIEZlYiAyMDIzIDE3OjMwOjQ2IC0wODAwClN1YmplY3Q6IFtQQVRD SCAxLzVdIEltcHJvdmUgaW5zZXJ0LWZpbGUtY29udGVudHMgY2hlY2tpbmcKCiogc3JjL2Z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zZXQgPSBmaWxlX29mZnNl dCAoYmVnKTsKLSAgZWxzZQotICAgIGJlZ19vZmZzZXQgPSAwOwotCi0gIGlmICghTklMUCAo ZW5kKSkKLSAgICBlbmRfb2Zmc2V0ID0gZmlsZV9vZmZzZXQgKGVuZCk7Ci0gIGVsc2UKKyAg aWYgKGVuZF9vZmZzZXQgPCAwKQogICAgIHsKICAgICAgIGlmICghcmVndWxhcikKIAllbmRf b2Zmc2V0ID0gVFlQRV9NQVhJTVVNIChvZmZfdCk7Ci0tIAoyLjM3LjIKCg== --------------c0Segc5XoTePSLcZgv2oSDi0 Content-Type: text/x-patch; charset=UTF-8; name="0002-Improve-insert-file-contents-on-non-regular-files.patch" Content-Disposition: attachment; filename*0="0002-Improve-insert-file-contents-on-non-regular-files.patch" Content-Transfer-Encoding: base64 RnJvbSBiMDg0MjY3MWU3NTBiZTA4MzU2NDI1ZTJmYzM4MjUxZTdiMDhkNWQ3IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBTdW4sIDEyIEZlYiAyMDIzIDE3OjUyOjQ2IC0wODAwClN1YmplY3Q6IFtQQVRD SCAyLzVdIEltcHJvdmUgaW5zZXJ0LWZpbGUtY29udGVudHMgb24gbm9uLXJlZ3VsYXIgZmls ZXMKTUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0 PVVURi04CkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IDhiaXQKCiogc3JjL2ZpbGVpby5j IChGaW5zZXJ0X2ZpbGVfY29udGVudHMpOgpJZiB0aGUgZmlsZSBpcyBub3QgYSByZWd1bGFy IGZpbGUsIGNoZWNrIFJFUExBQ0UgYW5kIFZJU0lUCmJlZm9yZSBkb2luZyBmdXJ0aGVyIHN5 c2NhbGxzIHRoYXQgd29u4oCZdCBtYXR0ZX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xkX3N0cmluZyAoImNhbm5vdCB1c2UgYSBz dGFydCBwb3NpdGlvbiBpbiBhIG5vbi1zZWVrYWJsZSBmaWxlL2RldmljZSIpLAogCQkgIG9y aWdfZmlsZW5hbWUpOwotCi0gICAgICBpZiAoIU5JTFAgKHJlcGxhY2UpKQotCXhzaWduYWwy IChRZmlsZV9lcnJvciwKLQkJICBidWlsZF9zdHJpbmcgKCJub3QgYSByZWd1bGFyIGZpbGUi KSwgb3JpZ19maWxlbmFtZSk7CiAgICAgfQogCiAgIGlmIChlbmRfb2Zmc2V0IDwgMCkKLS0g CjIuMzcuMgoK --------------c0Segc5XoTePSLcZgv2oSDi0 Content-Type: text/x-patch; charset=UTF-8; name="0003-Don-t-scan-text-twice-to-guess-coding-system.patch" Content-Disposition: attachment; filename="0003-Don-t-scan-text-twice-to-guess-coding-system.patch" Content-Transfer-Encoding: base64 RnJvbSBjY2MwOTIxMTUxNzJmMTVjOTEzNTc3MWY5MGQwMDAwZjhiZjIxNjE0IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBNb24sIDEzIEZlYiAyMDIzIDA4OjUxOjQ1IC0wODAwClN1YmplY3Q6IFtQQVRD SCAzLzVdID0/VVRGLTg/cT9Eb249RTI9ODA9OTl0PTIwc2Nhbj0yMHRleHQ9MjB0d2ljZT0y MHRvPTIwPz0KID0/VVRGLTg/cT9ndWVzcz0yMGNvZGluZz0yMHN5c3RlbT89Ck1JTUUtVmVy c2lvbjogMS4wCkNvbnRlbnQtVHlwZTogdGV4dC9wbGFpbjsgY2hhcnNldD1VVEYtOApDb250 ZW50LVRyYW5zZmVyLUVuY29kaW5nOiA4Yml0CgoqIHNyYy9maWxlaW8uYyAoRmluc2VydF9m aWxlX2NvbnRlbnRzKTogSWYgdGhlIGZpbGUgc2hyYW5rCmJlbG93IDQgS2lCLCBkb27igJl0 IHJlYWQgZHVwbGljYXRlIHRleHQgaW50byBSRUFEX0JVRi4KVGhpcyBhbHNvIHJlbW92ZXMg YSB1c2Ugb2YgU0VFS19FTkQsIHdoaWNoIExpbnV4IC9wcm9jCmZpbGUgc3lzdGVtcyBkbyBu b3Qgc3VwcG9ydCAobm90IHRoYXQgd2Ugc2hvdWxkIGdldCBoZXJlCndpdGggL3Byb2MpLgot LS0KIHNyYy9maWxlaW8uYyB8IDIgKy0KIDEgZmlsZSBjaGFuZ2VkLCAxIGluc2VydGlvbigr KSwgMSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL3NyYy9maWxlaW8uYyBiL3NyYy9maWxl aW8uYwppbmRleCA3NTFiOGVjNTczYy4uNDcxNzdiZTBmNGQgMTAwNjQ0Ci0tLSBhL3NyYy9m aWxlaW8uYworKysgYi9zcmMvZmlsZWlvLmMKQEAgLTQxMTksNyArNDExOSw3IEBAIGJlY2F1 c2UgKDEpIGl0IHByZXNlcnZlcyBzb21lIG1hcmtlciBwb3NpdGlvbnMgKGluIHVuY2hhbmdl ZCBwb3J0aW9ucwogCQkgIGlmIChucmVhZCA9PSAxMDI0KQogCQkgICAgewogCQkgICAgICBp bnQgbnRhaWw7Ci0JCSAgICAgIGlmIChsc2VlayAoZmQsIC0gKDEwMjQgKiAzKSwgU0VFS19F TkQpIDwgMCkKKwkJICAgICAgaWYgKGxzZWVrIChmZCwgc3Quc3Rfc2l6ZSAtIDEwMjQgKiAz LCBTRUVLX0NVUikgPCAwKQogCQkJcmVwb3J0X2ZpbGVfZXJyb3IgKCJTZXR0aW5nIGZpbGUg cG9zaXRpb24iLAogCQkJCQkgICBvcmlnX2ZpbGVuYW1lKTsKIAkJICAgICAgbnRhaWwgPSBl bWFjc19yZWFkX3F1aXQgKGZkLCByZWFkX2J1ZiArIG5yZWFkLCAxMDI0ICogMyk7Ci0tIAoy LjM3LjIKCg== --------------c0Segc5XoTePSLcZgv2oSDi0 Content-Type: text/x-patch; charset=UTF-8; name="0004-Fix-src-fileio.c-comment.patch" Content-Disposition: attachment; filename="0004-Fix-src-fileio.c-comment.patch" Content-Transfer-Encoding: base64 RnJvbSBiYWU1ZmE1ZDlhOGVmOGM0MWZiYjM0MDhlZWE0NDFhMmVlMTRkMWRiIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBNb24sIDEzIEZlYiAyMDIzIDA4OjUzOjUyIC0wODAwClN1YmplY3Q6IFtQQVRD SCA0LzVdIEZpeCBzcmMvZmlsZWlvLmMgY29tbWVudApNSU1FLVZlcnNpb246IDEuMApDb250 ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9VVRGLTgKQ29udGVudC1UcmFuc2Zlci1F bmNvZGluZzogOGJpdAoKKiBzcmMvZmlsZWlvLmMgKEZpbnNlcnRfZmlsZV9jb250ZW50cyk6 IEZpeCBjb21tZW50LgpTaW5jZSB0aGUgY29kZSByZWxpZXMgb24gc3Rfc2l6ZSwgaXTigJlz IGxpbWl0ZWQgdG8KcmVndWxhciBmaWxlcywgbm90IHRvIHNlZWthYmxlIGZpbGVzLgotLS0K IHNyYy9maWxlaW8uYyB8IDIgKy0KIDEgZmlsZSBjaGFuZ2VkLCAxIGluc2VydGlvbigrKSwg MSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL3NyYy9maWxlaW8uYyBiL3NyYy9maWxlaW8u YwppbmRleCA0NzE3N2JlMGY0ZC4uZWUzMGRiOGI0OWIgMTAwNjQ0Ci0tLSBhL3NyYy9maWxl aW8uYworKysgYi9zcmMvZmlsZWlvLmMKQEAgLTQxMDEsNyArNDEwMSw3IEBAIGJlY2F1c2Ug KDEpIGl0IHByZXNlcnZlcyBzb21lIG1hcmtlciBwb3NpdGlvbnMgKGluIHVuY2hhbmdlZCBw b3J0aW9ucwogICAgICAgZWxzZQogCXsKIAkgIC8qIERvbid0IHRyeSBsb29raW5nIGluc2lk ZSBhIGZpbGUgZm9yIGEgY29kaW5nIHN5c3RlbQotCSAgICAgc3BlY2lmaWNhdGlvbiBpZiBp dCBpcyBub3Qgc2Vla2FibGUuICAqLworCSAgICAgc3BlY2lmaWNhdGlvbiBpZiBpdCBpcyBu b3QgYSByZWd1bGFyIGZpbGUuICAqLwogCSAgaWYgKHJlZ3VsYXIgJiYgIU5JTFAgKFZzZXRf YXV0b19jb2RpbmdfZnVuY3Rpb24pKQogCSAgICB7CiAJICAgICAgLyogRmluZCBhIGNvZGlu ZyBzeXN0ZW0gc3BlY2lmaWVkIGluIHRoZSBoZWFkaW5nIHR3bwotLSAKMi4zNy4yCgo= --------------c0Segc5XoTePSLcZgv2oSDi0 Content-Type: text/x-patch; charset=UTF-8; name="0005-Fix-insert-file-contents-on-proc-files.patch" Content-Disposition: attachment; filename="0005-Fix-insert-file-contents-on-proc-files.patch" Content-Transfer-Encoding: base64 RnJvbSBiOTUwYjQ2ZjUxNDk4OTQ0MmZkZDk5MzdhMGU5NmQ1M2EzYWZmYTg4IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBNb24sIDEzIEZlYiAyMDIzIDEyOjMyOjExIC0wODAwClN1YmplY3Q6IFtQQVRD SCA1LzVdIEZpeCBpbnNlcnQtZmlsZS1jb250ZW50cyBvbiAvcHJvYyBmaWxlcwoKVGhpcyBz aG91bGQgZml4IEJ1ZyM5ODAwICgyMDExLTEwLTE5KS4KKiBzcmMvZmlsZWlvLmMgKEZpbnNl cnRfZmlsZV9jb250ZW50cyk6CkRvIG5vdCB0cnVzdCBzdF9zaXplIGV2ZW4gb24gcmVndWxh ciBmaWxlcywgYXMgdGhlIGZpbGUgbWlnaHQKYmUgYSBMaW51eCAvcHJvYyBmaWxlLCBvciBp dCBtaWdodCBiZSBncm93aW5nLgpJbnN0ZWFkLCBhbHdheXMgcmVhZCB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