GNU bug report logs -
#33524
27.0.50; Suspicious code in flymake-proc around temporary directories
Previous Next
Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>
Date: Tue, 27 Nov 2018 16:38:02 UTC
Severity: normal
Tags: patch
Found in version 27.0.50
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 33524 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Am Mi., 28. Nov. 2018 um 09:58 Uhr schrieb Michael Albinus <
michael.albinus <at> gmx.de>:
> Philipp Stephani <p.stephani2 <at> gmail.com> writes:
>
> Hi Phillipp,
>
> > I've noticed that the temporary directory code in flymake-proc has
> > issues with remote filenames. For example:
> >
> > $ emacs -Q -batch -l flymake-proc --eval='(print
> (flymake-proc-create-temp-with-folder-structure "/:/dir" nil))'
> >
> > "/tmp/:/dir"
> >
> > Clearly that's not what was intended. Rather, this should create the
> > directory structure on the remote machine.
>
> I don't understand. "/:/dir" is not a remote file name, it is a quoted
> file name. See (info "(emacs) Quoted File Names") for a description.
>
> Could you pls explain what you want to achieve? This would help to
> understand your problem.
>
>
Sorry for being imprecise. Yes, I mean quoted filenames. (It's possible
that the issue also arises for true remote filenames, but I haven't
checked.)
You can easily reproduce user-facing problems. Assuming you have some
binary installed that would check Java files using the legacy backend:
$ touch /tmp/{a,b}.java
$ emacs -Q -eval '(progn (add-hook (quote prog-mode-hook) (quote
flymake-mode)) (ediff "/:/tmp/a.java" "/:/tmp/b.java"))'
And Emacs immediately hangs because it runs into the endless loop.
Stacktrace in this case is
Debugger entered--Lisp error: (quit)
display-warning((flymake flymake-proc) "Failed to delete dir /, error
ignored" :error "*Flymake log*")
flymake--log-1(1 flymake-proc "Failed to delete dir %s, error ignored"
"/")
flymake-proc--safe-delete-directory("/")
flymake-proc--delete-temp-directory("/tmp/:/tmp/")
flymake-proc-simple-java-cleanup()
#f(compiled-function () #<bytecode 0x11a4ea9>)()
flymake-proc-legacy-flymake(#f(compiled-function (&rest args) #<bytecode
0x11a4e51>))
flymake--run-backend(flymake-proc-legacy-flymake)
#f(compiled-function (backend) #<bytecode
0x117b195>)(flymake-proc-legacy-flymake)
run-hook-wrapped(#f(compiled-function (backend) #<bytecode 0x117b195>)
flymake-proc-legacy-flymake)
flymake-start((post-command) nil)
#f(compiled-function () #<bytecode 0x1180771>)()
set-window-buffer(nil #<buffer a.java>)
switch-to-buffer(#<buffer a.java>)
ediff-setup-windows-multiframe-compare(#<buffer a.java> #<buffer b.java>
nil #<buffer *Ediff Control Panel*>)
ediff-setup-windows-multiframe(#<buffer a.java> #<buffer b.java> nil
#<buffer *Ediff Control Panel*>)
ediff-setup-windows-default(#<buffer a.java> #<buffer b.java> nil
#<buffer *Ediff Control Panel*>)
ediff-setup-windows(#<buffer a.java> #<buffer b.java> nil #<buffer *Ediff
Control Panel*>)
ediff-setup(#<buffer a.java> "/:/tmp/a.java" #<buffer b.java>
"/:/tmp/b.java" nil nil nil ((ediff-job-name . ediff-files)) nil)
ediff-files-internal("/:/tmp/a.java" "/:/tmp/b.java" nil nil ediff-files)
ediff("/:/tmp/a.java" "/:/tmp/b.java")
(progn (add-hook (quote prog-mode-hook) (quote flymake-mode)) (ediff
"/:/tmp/a.java" "/:/tmp/b.java"))
eval((progn (add-hook (quote prog-mode-hook) (quote flymake-mode)) (ediff
"/:/tmp/a.java" "/:/tmp/b.java")))
command-line-1(("-f" "toggle-debug-on-quit" "-eval" "(progn (add-hook
(quote prog-mode-hook) (quote flymake-mode)) (ediff \"/:/tmp/a.java\"
\"/:/tmp/b.java\"))"))
command-line()
normal-top-level()
[Message part 2 (text/html, inline)]
This bug report was last modified 6 years and 159 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.