unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* RE: Max-specpdl-size Bug in Emacs Lisp Interpreter?
@ 2006-04-16  7:59 Herbert Euler
  2006-04-17  2:40 ` Herbert Euler
  2006-04-17 17:56 ` Richard Stallman
  0 siblings, 2 replies; 25+ messages in thread
From: Herbert Euler @ 2006-04-16  7:59 UTC (permalink / raw)


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" <herberteuler@hotmail.com>
>To: emacs-devel@gnu.org
>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
>Emacs-devel@gnu.org
>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/

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: Max-specpdl-size Bug in Emacs Lisp Interpreter?
@ 2006-04-18 13:51 Herbert Euler
  0 siblings, 0 replies; 25+ messages in thread
From: Herbert Euler @ 2006-04-18 13:51 UTC (permalink / raw)


>From: Luc Teirlinck <teirllm@dms.auburn.edu>
>To: miles@gnu.org
>CC: herberteuler@hotmail.com, rms@gnu.org, emacs-devel@gnu.org
>Subject: Re: Max-specpdl-size Bug in Emacs Lisp Interpreter?
>Date: Tue, 18 Apr 2006 00:44:19 -0500 (CDT)
>
>Miles Bader wrote:
>
>    "Herbert Euler" <herberteuler@hotmail.com> writes:
>    >>     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.
>    >>
>    >>What would you think of specpdl-size-limit as a name for this?
>    >
>    > Yes it's better, since this name (in my opinion) is not confused.
>
>    They sound exactly the same to me...
>
>They sound exactly the same to me too.  I do not see any reason to
>change the current name.


Is "maximum" in English different from similar words in other languages?
Emacs is an "extensible, customizable" editor, leaving most options to
user.  Perhaps because of techniqucal reasons, this value cannot be
kept in poor conditions.  So it doesn't exactly confirm to what user
thinks, in my opinion, this is not the "maximum" value set by user.
So the two names are different to me.

Regards,
Guanpeng Xu

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Max-specpdl-size Bug in Emacs Lisp Interpreter?
@ 2006-04-15  8:24 Herbert Euler
  0 siblings, 0 replies; 25+ messages in thread
From: Herbert Euler @ 2006-04-15  8:24 UTC (permalink / raw)


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/

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2006-04-19 15:40 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-16  7:59 Max-specpdl-size Bug in Emacs Lisp Interpreter? Herbert Euler
2006-04-17  2:40 ` Herbert Euler
2006-04-17  9:06   ` Romain Francoise
2006-04-18  1:41   ` Richard Stallman
2006-04-18  3:20     ` Herbert Euler
2006-04-18  6:36       ` David Kastrup
2006-04-18 14:07         ` Herbert Euler
2006-04-18 11:25       ` Juanma Barranquero
2006-04-18 20:50       ` Richard Stallman
2006-04-19  1:43         ` Herbert Euler
2006-04-17 17:56 ` Richard Stallman
2006-04-18  2:18   ` Herbert Euler
2006-04-18  2:22     ` Miles Bader
2006-04-18  5:44       ` Luc Teirlinck
2006-04-18 20:50         ` Richard Stallman
2006-04-18 23:34           ` Miles Bader
2006-04-18 23:43             ` David Kastrup
2006-04-19  3:07               ` Herbert Euler
2006-04-19 15:40                 ` Richard Stallman
2006-04-19  2:59             ` Herbert Euler
2006-04-19  3:47               ` Luc Teirlinck
2006-04-19  4:03               ` Luc Teirlinck
2006-04-19  5:11                 ` Herbert Euler
  -- strict thread matches above, loose matches on Subject: below --
2006-04-18 13:51 Herbert Euler
2006-04-15  8:24 Herbert Euler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).