Subject: bug#30243: 26.0.91; Infinite recursion in `make-auto-save-file-name' for quoted filenames

From: Michael Albinus <[email-masked]>
Date: Thu, 25 Jan 2018 17:36:26 +0100

Noam Postavsky <[email-masked]> writes:

Hi Noam,

> I pushed my patch to the scratch/nonspecial-handlers branch.  If you run
>
>     make -C test files-tests SELECTOR='\"non-special\"'
>
> you will see the relevant tests,

Thanks.

> files-file-name-non-special-notify-handlers being the one which
> currently fails.  Maybe it's just a matter of binding
> file-name-handler-alist to nil again for those operations, not sure.

I tried to debug this interactively. First, I had to give the debug
property to files-tests--with-temp-file and files-tests--with-temp-dir,
in order to be able to debug interactively.

I've tried to instrument file-notify-valid-p for debugging, but I've got
the error

Invalid read syntax: "Expected lambda expression"

Strange. No idea what's up, could it be due to the when-let* macro?

Anyway, I've instrumented files-file-name-non-special-notify-handlers.
When running the test, it returns file-notify-add-watch as expected, but
when entering file-notify-valid-p, it returns the error

Lisp nesting exceeds 'max-lisp-eval-depth'

Emacs is frozen, and there is the error message in the shell Emacs is
started from:

emacs: malloc.c:2427: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Fatal error 6: Aborted

No idea what's up. I'd say you've uncovered a bug :-)

I'll try to continue tomorrow, running Emacs under gdb, but for now I
have to stop (there's a life outside Emacs ...)

> PS we should probably update test/Makefile.in to require less escaping
> for SELECTOR.

Go on. But pls remember, that SELECTOR is not a string only, it can be
also a Lisp form.

Best regards, Michael.