[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20241: 25.0.50; `setq' with only one argument
From: |
Alan Mackenzie |
Subject: |
bug#20241: 25.0.50; `setq' with only one argument |
Date: |
Thu, 26 Nov 2015 12:06:19 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hello, Andreas.
On Thu, Nov 26, 2015 at 09:58:39AM +0100, Andreas Schwab wrote:
> Johan Bockgård <bojohan@gnu.org> writes:
> > (funcall) (print t)
> > Compile. Load .elc =>
> > This consistently gives me one of two results:
> > A segfault, or "Invalid function: 183795961" where the actual
> > number depends on the timestamp of the .elc file.
> That's a bug in the byte compiler, it shouldn't generate call 0 without
> an operand on the stack.
Try the following fix:
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index ffe73de..842e73d 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -4012,8 +4012,12 @@ byte-compile-while
(setq byte-compile--for-effect nil)))
(defun byte-compile-funcall (form)
- (mapc 'byte-compile-form (cdr form))
- (byte-compile-out 'byte-call (length (cdr (cdr form)))))
+ (if (cdr form)
+ (progn
+ (mapc 'byte-compile-form (cdr form))
+ (byte-compile-out 'byte-call (length (cdr (cdr form)))))
+ (byte-compile-log-warning "`funcall' called with no arguments" nil :error)
+ (byte-compile-form '(signal 'wrong-number-of-arguments '(funcall 0)))))
;; let binding
> Andreas.
--
Alan Mackenzie (Nuremberg, Germany).
- bug#20241: 25.0.50; `setq' with only one argument, (continued)
- bug#20241: 25.0.50; `setq' with only one argument, Alan Mackenzie, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, Drew Adams, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, John Wiegley, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, John Mastro, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, Johan Bockgård, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, Andreas Schwab, 2015/11/26
- bug#20241: 25.0.50; `setq' with only one argument,
Alan Mackenzie <=
- bug#20241: 25.0.50; `setq' with only one argument, Artur Malabarba, 2015/11/26
- bug#20241: 25.0.50; `setq' with only one argument, Alan Mackenzie, 2015/11/26
- bug#20241: 25.0.50; `setq' with only one argument, Artur Malabarba, 2015/11/26
- bug#20241: 25.0.50; `setq' with only one argument, Nicolas Richard, 2015/11/25