GNU bug report logs - #45540
27.1; symbolic links crash dired

Previous Next

Package: emacs;

Reported by: Devon Sean McCullough <Emacs-hacker2018 <at> jovi.net>

Date: Tue, 29 Dec 2020 21:55:02 UTC

Severity: normal

Tags: moreinfo

Found in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45540 in the body.
You can then email your comments to 45540 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#45540; Package emacs. (Tue, 29 Dec 2020 21:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Devon Sean McCullough <Emacs-hacker2018 <at> jovi.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 29 Dec 2020 21:55:02 GMT) Full text and rfc822 format available.

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

From: Devon Sean McCullough <Emacs-hacker2018 <at> jovi.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; symbolic links crash dired
Date: Tue, 29 Dec 2020 16:54:15 -0500
Here's a fix.  I did NOT check this carefully.
Dired crashes when (< (length file-name) (length root))

diff -aBbdu --label 
/Applications/Emacs-27.1.app/Contents/Resources/lisp/files.el.gz --label 
\#\<buffer\ files.el.gz\> 
/var/folders/jv/9lctn91j0xqfv3f2kxc1lxx80000gn/T/jka-comtv7p5N 
/var/folders/jv/9lctn91j0xqfv3f2kxc1lxx80000gn/T/buffer-content-fatCkh
--- /Applications/Emacs-27.1.app/Contents/Resources/lisp/files.el.gz
+++ #<buffer files.el.gz>
@@ -4019,10 +4019,9 @@
   (let* ((file-name (or (buffer-file-name)
 			;; Handle non-file buffers, too.
 			(expand-file-name default-directory)))
-	 (sub-file-name (if (and file-name
+	 (sub-file-name (when (and file-name
                                  (file-name-absolute-p file-name))
-                            ;; FIXME: Why not use file-relative-name?
-			    (substring file-name (length root)))))
+			  (file-relative-name file-name root))))
     (condition-case err
         (dolist (entry class-variables variables)
           (let ((key (car entry)))

Diff finished.  Tue Dec 29 16:42:36 2020




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45540; Package emacs. (Wed, 30 Dec 2020 03:35:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Devon Sean McCullough <Emacs-hacker2018 <at> jovi.net>
Cc: 45540 <at> debbugs.gnu.org
Subject: Re: bug#45540: 27.1; symbolic links crash dired
Date: Wed, 30 Dec 2020 04:34:46 +0100
Devon Sean McCullough <Emacs-hacker2018 <at> jovi.net> writes:

> Here's a fix.  I did NOT check this carefully.
> Dired crashes when (< (length file-name) (length root))

The patch looks reasonable -- but do you have a test case that
reproduces this bug (starting from "emacs -Q") so that we can verify the
bug and the fix?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 23 Jan 2021 22:31:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45540; Package emacs. (Sat, 23 Jan 2021 22:49:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Devon Sean McCullough <Emacs-hacker2018 <at> jovi.net>
Cc: 45540 <at> debbugs.gnu.org
Subject: Re: bug#45540: 27.1; symbolic links crash dired
Date: Sat, 23 Jan 2021 23:48:02 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Devon Sean McCullough <Emacs-hacker2018 <at> jovi.net> writes:
>
>> Here's a fix.  I did NOT check this carefully.
>> Dired crashes when (< (length file-name) (length root))
>
> The patch looks reasonable -- but do you have a test case that
> reproduces this bug (starting from "emacs -Q") so that we can verify the
> bug and the fix?

I tried various link scenarios to come up with a case where file-name
was shorter than root, and I was unable to.  Do you have a test case for
such a setup?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45540; Package emacs. (Mon, 25 Jan 2021 23:49:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Devon Sean McCullough <Emacs-hacker2018 <at> jovi.net>
Cc: 45540 <at> debbugs.gnu.org
Subject: Re: bug#45540: 27.1; symbolic links crash dired
Date: Tue, 26 Jan 2021 00:48:27 +0100
(Please keep the debbugs address in the CC header; otherwise the mail
won't reach the bug tracker.)

Devon Sean McCullough <Emacs-hacker2018 <at> jovi.net> writes:

> Before I patched it, dired was constantly crashing.
> I've unpatched it and (setq directory-abbrev-alist nil)
> but still no crash, mystery.  I'll keep digging.

Thanks.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45540; Package emacs. (Mon, 01 Mar 2021 15:19:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Devon Sean McCullough <Emacs-hacker2018 <at> jovi.net>
Cc: 45540 <at> debbugs.gnu.org
Subject: Re: bug#45540: 27.1; symbolic links crash dired
Date: Mon, 01 Mar 2021 16:18:06 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I tried various link scenarios to come up with a case where file-name
> was shorter than root, and I was unable to.  Do you have a test case for
> such a setup?

More information was requested, but no response was given within a
month, so I'm closing this bug report.  If the problem still exists,
please respond to this email and we'll reopen the bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 45540 <at> debbugs.gnu.org and Devon Sean McCullough <Emacs-hacker2018 <at> jovi.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 01 Mar 2021 15:19:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 30 Mar 2021 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 20 days ago.

Previous Next


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