From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.devel Subject: Max-specpdl-size Bug in Emacs Lisp Interpreter? Date: Sat, 15 Apr 2006 16:24:56 +0800 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1145089619 2202 80.91.229.2 (15 Apr 2006 08:26:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 Apr 2006 08:26:59 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 15 10:26:55 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FUg7C-0000aM-Ue for ged-emacs-devel@m.gmane.org; Sat, 15 Apr 2006 10:26:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FUg7B-0003QL-QU for ged-emacs-devel@m.gmane.org; Sat, 15 Apr 2006 04:26:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FUg6x-0003Of-ER for emacs-devel@gnu.org; Sat, 15 Apr 2006 04:26:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FUg6w-0003Nb-HI for emacs-devel@gnu.org; Sat, 15 Apr 2006 04:26:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FUg6w-0003NL-As for emacs-devel@gnu.org; Sat, 15 Apr 2006 04:26:30 -0400 Original-Received: from [64.4.26.16] (helo=hotmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FUg75-0007mW-N8 for emacs-devel@gnu.org; Sat, 15 Apr 2006 04:26:40 -0400 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 15 Apr 2006 01:24:56 -0700 Original-Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with HTTP; Sat, 15 Apr 2006 08:24:56 GMT X-Originating-IP: [202.165.107.100] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com Original-To: emacs-devel@gnu.org X-OriginalArrivalTime: 15 Apr 2006 08:24:56.0847 (UTC) FILETIME=[143339F0:01C66066] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52890 Archived-At: 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/