bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34757: Invalid bytecode from byte compiler


From: Stefan Monnier
Subject: bug#34757: Invalid bytecode from byte compiler
Date: Sat, 27 Jul 2019 17:30:03 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> We could fix byte-compile-out-toplevel to properly analyze how many
> stack arguments the call takes, but this patch simply treats forms
> like this as nontrivial:
>
> diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
> index 0b8f8824b4c..4e54e08ce14 100644
> --- a/lisp/emacs-lisp/bytecomp.el
> +++ b/lisp/emacs-lisp/bytecomp.el
> @@ -3025,6 +3025,7 @@ byte-compile-out-toplevel
>                         (or (null (cdr rest))
>                             (and (memq output-type '(file progn t))
>                                  (cdr (cdr rest))
> +                                (eql (length body) (cdr (car rest)))
>                                  (eq (car (nth 1 rest)) 'byte-discard)
>                                  (progn (setq rest (cdr rest)) t))))
>                    (setq maycall nil)    ; Only allow one real function call.

I installed this fix for now.


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]