From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#38777: 26.3; tar-mode doesn't list a file / crashes on package-tar-file-info Date: Sat, 28 Dec 2019 21:54:35 +0200 Message-ID: <83eewons3o.fsf@gnu.org> References: <1577555517.09cwixy20a.astroid@thinkingbus.none> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="233032"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38777@debbugs.gnu.org To: Victor Collod Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 28 20:55:26 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ilIBK-000yQk-FC for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Dec 2019 20:55:26 +0100 Original-Received: from localhost ([::1]:45902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilIBI-0004h8-Qy for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Dec 2019 14:55:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60125) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilIAy-0004LX-5x for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2019 14:55:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ilIAw-0004J1-PR for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2019 14:55:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52980) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ilIAw-0004Hs-Jv for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2019 14:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ilIAw-0000rn-Jf for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2019 14:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Dec 2019 19:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38777 X-GNU-PR-Package: emacs Original-Received: via spool by 38777-submit@debbugs.gnu.org id=B38777.15775628873296 (code B ref 38777); Sat, 28 Dec 2019 19:55:02 +0000 Original-Received: (at 38777) by debbugs.gnu.org; 28 Dec 2019 19:54:47 +0000 Original-Received: from localhost ([127.0.0.1]:58950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilIAg-0000r5-N4 for submit@debbugs.gnu.org; Sat, 28 Dec 2019 14:54:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilIAe-0000qt-DR for 38777@debbugs.gnu.org; Sat, 28 Dec 2019 14:54:45 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ilIAY-000253-Nq; Sat, 28 Dec 2019 14:54:38 -0500 Original-Received: from [176.228.60.248] (port=4763 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ilIAU-0006rn-U3; Sat, 28 Dec 2019 14:54:38 -0500 In-reply-to: <1577555517.09cwixy20a.astroid@thinkingbus.none> (message from Victor Collod on Sat, 28 Dec 2019 19:09:40 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173865 Archived-At: > Date: Sat, 28 Dec 2019 19:09:40 +0100 > From: Victor Collod > > A few months ago, the nix port of irony stopped building for a very, very strange reason: > when the complete path of the package metadata file is 32 characters long (plus some other unknown conditions), it isn't shown in the tar-mode file list view, and running (package-tar-file-info) fails with the following stack trace: > > > Debugger entered--Lisp error: (wrong-type-argument arrayp nil) > > tar--describe-as-link(nil) > > tar--check-descriptor(nil) > > tar-get-file-descriptor("irony-20190703.1732/irony-pkg.el") > > package-tar-file-info() > > eval((package-tar-file-info) nil) > > eval-expression((package-tar-file-info) nil nil 127) > > funcall-interactively(eval-expression (package-tar-file-info) nil nil 127) > > call-interactively(eval-expression record nil) > > command-execute(eval-expression record) > > execute-extended-command(nil "eval-expression" nil) > > funcall-interactively(execute-extended-command nil "eval-expression" nil) > > call-interactively(execute-extended-command nil nil) > > command-execute(execute-extended-command) > > Unfortunately, my yet to be found lisp programming skills are way too low to solve this issue. > I have tried and failed to understand what's going on. Perhaps this bug isn't a good introduction to lisp programming :/ > > Here is the related (worked around) NixOS issue: > https://github.com/NixOS/nixpkgs/issues/66556#issuecomment-522809883 > > And a link to a zip file containing the cursed tar file: > https://github.com/NixOS/nixpkgs/files/3522572/repro.zip Looks like invalid tar file? It uses the magic string of "ustar " (two trailing blanks), whereas we only recognize at most one. So the first entry with a file name longer than 100 bytes confuses tar-mode.el. Does anyone know if this is valid in tar files? If so, tar-header-block-tokenize will have to be updated.