GNU bug report logs - #30243
26.0.91; Infinite recursion in `make-auto-save-file-name' for quoted filenames

Previous Next

Package: emacs;

Reported by: phst <at> a.muc.corp.google.com

Date: Wed, 24 Jan 2018 22:23:01 UTC

Severity: normal

Tags: fixed

Found in version 26.0.91

Fixed in version 26.1

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


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

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 30243 <at> debbugs.gnu.org, phst <at> a.muc.corp.google.com
Subject: Re: bug#30243: 26.0.91;
 Infinite recursion in `make-auto-save-file-name' for quoted filenames
Date: Thu, 25 Jan 2018 00:57:46 -0500
[Message part 1 (text/plain, inline)]
Philipp Stephani <p.stephani2 <at> gmail.com> writes:

> Noam Postavsky <npostavs <at> users.sourceforge.net> schrieb am Do., 25.
> Jan. 2018 um 00:04 Uhr:

>     +         (buffer-file-name
>     +          (if (and (memq operation '(make-auto-save-file-name))
>     +                   (string-match "\\`/:" buffer-file-name))
>     +              (substring buffer-file-name (match-end 0))
>     +            buffer-file-name))

> Thanks, when you commit this, could you please also add a regression
> test so we don't reintroduce the bug later? 

Yeah, we need to test more than just that operation though.  I've added
a test for all the operations listed in `(elisp) Magic File Names'.  I
discovered several other similar problems.  With
`file-name-all-completions' I even got Emacs to crash (I presume due to
stack corruption during the recursion).  Also note that the above patch
breaks find-file for /: quoted files, buffer-file-name needs to be bound
more selectively (as in the new patch, attached below).

`file-notify-rm-watch' and `file-notify-valid-p' are still broken, I
can't immediately see how to fix them and it's getting past my bedtime.

[v2-0001-Test-and-fix-quoted-file-name-handlers-Bug-30243.patch (text/x-diff, attachment)]

This bug report was last modified 7 years and 192 days ago.

Previous Next


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