GNU bug report logs - #41065
Result of byte-compilation can be nil even if the compiled file contains no errors

Previous Next

Package: emacs;

Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>

Date: Sun, 3 May 2020 22:22:02 UTC

Severity: minor

Tags: fixed

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Paul Pogonyshev <pogonyshev <at> gmail.com>
Cc: 41065 <at> debbugs.gnu.org
Subject: bug#41065: (no subject)
Date: Tue, 27 Oct 2020 09:47:07 +0100
Paul Pogonyshev <pogonyshev <at> gmail.com> writes:

> Subject: [PATCH] Don't leak result of nested byte-compilation to outer level
>  (bug#41065)

[...]

> +	byte-compile-dest-file byte-compiler-error-flag)
>      (setq target-file (byte-compile-dest-file filename))
>      (setq byte-compile-dest-file target-file)
>      (with-current-buffer
> @@ -2000,7 +2000,6 @@ byte-compile-file
>  	  'no-byte-compile)
>        (when byte-compile-verbose
>  	(message "Compiling %s..." filename))
> -      (setq byte-compiler-error-flag nil)

Thanks; applied to Emacs 28.  I tried to follow the code paths where
this variable is used, and as far as I can tell, this should be safe.

The old code was rather odd, because there's just a

(defvar byte-compiler-error-flag)

in the file -- it's not actually defined, but after compiling something,
that `setq' would define it globally.  So your patch fixes that problem,
too.

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




This bug report was last modified 4 years and 208 days ago.

Previous Next


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