aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2010-09-27 19:14:58 +0200
committerAndreas Schwab2010-09-27 19:14:58 +0200
commitc19f76a18bb56236a4e043928598dcac5831aa14 (patch)
tree3a05c8fbd5a9eb64f11c71447f82ffa8b5c809e6
parent789af3cd80d7d399394e518ce0458c234fedf54a (diff)
downloademacs-c19f76a18bb56236a4e043928598dcac5831aa14.tar.gz
emacs-c19f76a18bb56236a4e043928598dcac5831aa14.zip
* emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Avoid
infinite recursion on erroneous lambda form. (Bug#7114)
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/byte-opt.el8
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0bbc1648dec..45f32afa0a8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12010-09-27 Andreas Schwab <schwab@linux-m68k.org>
2
3 * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Avoid
4 infinite recursion on erroneous lambda form. (Bug#7114)
5
12010-09-27 Kenichi Handa <handa@m17n.org> 62010-09-27 Kenichi Handa <handa@m17n.org>
2 7
3 * tar-mode.el (tar-header-block-tokenize): Decode filenames in 8 * tar-mode.el (tar-header-block-tokenize): Decode filenames in
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 @@
381 form)) 381 form))
382 ((or (byte-code-function-p fn) 382 ((or (byte-code-function-p fn)
383 (eq 'lambda (car-safe fn))) 383 (eq 'lambda (car-safe fn)))
384 (byte-optimize-form-code-walker 384 (let ((newform (byte-compile-unfold-lambda form)))
385 (byte-compile-unfold-lambda form) 385 (if (eq newform form)
386 for-effect)) 386 ;; Some error occured, avoid infinite recursion
387 form
388 (byte-optimize-form-code-walker newform for-effect))))
387 ((memq fn '(let let*)) 389 ((memq fn '(let let*))
388 ;; recursively enter the optimizer for the bindings and body 390 ;; recursively enter the optimizer for the bindings and body
389 ;; of a let or let*. This for depth-firstness: forms that 391 ;; of a let or let*. This for depth-firstness: forms that