From: "Herbert Euler" <address@hidden>
To: address@hidden
Subject: Max-specpdl-size Bug in Emacs Lisp Interpreter?
Date: Sat, 15 Apr 2006 16:24:56 +0800
Hello,
These days I read source for 'catch' and 'throw' of emacs lisp.
Then I traced into unbind-to in eval.c, and some functions
operating 'specpdl'. I created some hypothesises to understand
them. Since 'let' invokes 'specbind' as well, I guessed I can
verify these hypothesises with let. Here is what I did (I'm using
Emacs Unicode 2 from CVS, latest check Apr. 8, 2006):
(defmacro create-let (n)
(let ((i 0)
list)
`(let ,(progn
(while (< i n)
(setq list (cons (intern (concat "v" (number-to-string i)))
list))
(setq i (1+ i)))
list)
(message "hello"))))
=> create-let
max-specpdl-size
=> 1000
(create-let 1000)
=> [error: Variable binding depth exceeds max-specpdl-size]
max-specpdl-size
=> 1000
(create-let 1000)
=> "hello"
(create-let 2000)
=> [error: Variable binding depth exceeds max-specpdl-size]
max-specpdl-size
=> 1101
(create-let 1200)
=> "hello"
max-specpdl-size
=> 1242
I just executed them sequentially. The behavior of last several
evaluations may be different, but they are always not correct in
my Emacs (judged by 'max-specpdl-size' should not be modified
and 'create-let' should fail if its argument exceeds 'max-specpdl
-size').
Does this imply a bug in Emacs Lisp interpreter?
Regards,
Guanpeng Xu
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel