diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2010-09-27 19:14:58 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2010-09-27 19:14:58 +0200 |
commit | c19f76a18bb56236a4e043928598dcac5831aa14 (patch) | |
tree | 3a05c8fbd5a9eb64f11c71447f82ffa8b5c809e6 /lisp/emacs-lisp/byte-opt.el | |
parent | 789af3cd80d7d399394e518ce0458c234fedf54a (diff) | |
download | emacs-c19f76a18bb56236a4e043928598dcac5831aa14.tar.gz emacs-c19f76a18bb56236a4e043928598dcac5831aa14.tar.bz2 emacs-c19f76a18bb56236a4e043928598dcac5831aa14.zip |
* emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Avoid
infinite recursion on erroneous lambda form. (Bug#7114)
Diffstat (limited to 'lisp/emacs-lisp/byte-opt.el')
-rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index e461010a6ce..4950511ebe2 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -381,9 +381,11 @@ form)) ((or (byte-code-function-p fn) (eq 'lambda (car-safe fn))) - (byte-optimize-form-code-walker - (byte-compile-unfold-lambda form) - for-effect)) + (let ((newform (byte-compile-unfold-lambda form))) + (if (eq newform form) + ;; Some error occured, avoid infinite recursion + form + (byte-optimize-form-code-walker newform for-effect)))) ((memq fn '(let let*)) ;; recursively enter the optimizer for the bindings and body ;; of a let or let*. This for depth-firstness: forms that |