emacs-devel
[Top][All Lists]
Advanced

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

RE: Max-specpdl-size Bug in Emacs Lisp Interpreter?


From: Herbert Euler
Subject: RE: Max-specpdl-size Bug in Emacs Lisp Interpreter?
Date: Sun, 16 Apr 2006 15:59:01 +0800

Having read "(elisp)Local Variables", I know that it is a known feature.
But if so I think the name 'max-specpdl-size' should be altered, since
normally a maximum value needs explicitly change, i.e. there should be
a particular function to change a maximum value.  Such a way that
change it implicitly would makes people who don't know about it
confused about its "maximum" trait.

Regards,
Guanpeng Xu


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

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/





reply via email to

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