GNU bug report logs - #38777
26.3; tar-mode doesn't list a file / crashes on package-tar-file-info

Previous Next

Package: emacs;

Reported by: Victor Collod <victor.collod <at> epita.fr>

Date: Sat, 28 Dec 2019 19:01:02 UTC

Severity: normal

Found in version 26.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 38777 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Victor Collod <victor.collod <at> epita.fr>
Cc: 38777 <at> debbugs.gnu.org
Subject: Re: 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
> Date: Sat, 28 Dec 2019 19:09:40 +0100
> From: Victor Collod <victor.collod <at> epita.fr>
> 
> 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.




This bug report was last modified 5 years and 144 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.