GNU bug report logs - #48452
28.0.50; flymake for elisp does not respect `load-path`

Previous Next

Package: emacs;

Reported by: Max Brieiev <max.brieiev <at> gmail.com>

Date: Sat, 15 May 2021 20:47:02 UTC

Severity: normal

Found in version 28.0.50

Full log


View this message in rfc822 format

From: João Távora <joaotavora <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Max Brieiev <max.brieiev <at> gmail.com>, 48452 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#48452: 28.0.50; flymake for elisp does not respect `load-path`
Date: Sun, 24 Jul 2022 10:57:23 +0100
[Message part 1 (text/plain, inline)]
On Sun, Jul 24, 2022 at 10:18 AM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> João Távora <joaotavora <at> gmail.com> writes:
>
> > Or maybe -- again, I'm just guessing -- the danger is that that bad.el
> > is disguised under /tmp/pcase.el and /tmp/good.el has a perfectly
> > legitimate.
> >
> >    (require 'pcase)
> >
> > Simply visitng /tmp/good.el with Flymake on would lead to disaster.
>
> Yes.  Sorry, I thought it was self-evident that that's the problem I was
> talking about with having "./" in load-path.
>

OK. I just hope that this thread has left it clear that simply visiting that
/tmp/pcase-not-malicious-at-all.el can lead to "disaster" regardless
of the value in elisp-flymake-byte-compile-load-path .

> If
> > that's the case, it's as easy as applying this patch
>
> [...]
>
> > -                   ,@(mapcan (lambda (path) (list "-L" path))
> > +                   ,@(mapcan (lambda (path) (list "-L" (format ":%s"
> path)))
> >                               elisp-flymake-byte-compile-load-path)
>
> That would be a distinct improvement; yes.  (But with a comment about
> what that does, because it's not self explanatory.)
>
> OK, I can do that.

João Távora
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 299 days ago.

Previous Next


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