unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: max-specpdl-size exceeded on "make recompile"
  2004-11-18 21:40 max-specpdl-size exceeded on "make recompile" Thien-Thi Nguyen
@ 2004-11-18 21:25 ` Stefan Monnier
  2004-11-18 23:20   ` Thien-Thi Nguyen
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2004-11-18 21:25 UTC (permalink / raw)
  Cc: emacs-devel

>   Compiling /home/ttn/build/GNU/emacs/lisp/vc-rcs.el...
  
>   In toplevel form:
>   vc-rcs.el:1021:9:Error: Variable binding depth exceeds max-specpdl-size

> the result is that vc-rcs.elc is not written.  two questions:
> (1) what is the best way to fix this w/o changing vc-rcs.el?

What makes you think that it's not a bug in vc-rcs.el?


        Stefan

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

* max-specpdl-size exceeded on "make recompile"
@ 2004-11-18 21:40 Thien-Thi Nguyen
  2004-11-18 21:25 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Thien-Thi Nguyen @ 2004-11-18 21:40 UTC (permalink / raw)


in CVS emacs (updated in the last day or so),
w/ patched vc-rcs.el[1], i see the error:

  Compiling /home/ttn/build/GNU/emacs/lisp/vc-rcs.el...
  
  In toplevel form:
  vc-rcs.el:1021:9:Error: Variable binding depth exceeds max-specpdl-size

the result is that vc-rcs.elc is not written.  two questions:
(1) what is the best way to fix this w/o changing vc-rcs.el?
(2) should the method for (1) be added to the elisp manual?

i ask (2) because that's where i went first to try to answer (1).
if (2) => "no", (2a) would be "well then, where?".

thi


______________________________________________________
 [1] patch available in dir: http://www.glug.org/tmp/

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

* Re: max-specpdl-size exceeded on "make recompile"
  2004-11-18 21:25 ` Stefan Monnier
@ 2004-11-18 23:20   ` Thien-Thi Nguyen
  2004-11-18 23:57     ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Thien-Thi Nguyen @ 2004-11-18 23:20 UTC (permalink / raw)
  Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

   What makes you think that it's not a bug in vc-rcs.el?

i'm ignorant of byte compiler internals, but am under the impression
that generally compilation of defuns (such as is the case here) does
not imply their evaluation.  that's one reason to discount possible
vc-rcs.el bugginess.  another is that the upstream variant[1] of the
code byte-compiles and executes w/o this error, if i (locally) bump
`max-specpdl-size' to 1000.[2]

of course, if you define buggy as "pushes the byte-compiler past its
comfort level", then sure...

btw, i tried placing `max-specpdl-size' in an end-of-file local
variables block, but that resulted in:

  Ignoring risky spec in the local variables list

i suppose it's time to browse bytecomp.el.

thi

________________________________________________________________________
 [1] http://www.glug.org/people/ttn/software/ttn-pers-elisp/standalone/
 [2] (defun do-the-make! ()
       (flet ((ls (type) (split-string
                          (with-temp-buffer
                            (insert-file-contents
                             (expand-file-name type "file-lists"))
                            (buffer-string)))))
         (let ((vc-handled-backends nil)     ; disable vc
               (max-specpdl-size 1000)       ; comma-v.el needs this (!)
               (subdirs (ls "lisp-subdirs")))
           ...
           (byte-compile-file file)
           ...
           )))

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

* Re: max-specpdl-size exceeded on "make recompile"
  2004-11-18 23:20   ` Thien-Thi Nguyen
@ 2004-11-18 23:57     ` Stefan Monnier
  2004-11-19 14:19       ` Thien-Thi Nguyen
  2004-11-19 14:32       ` Thien-Thi Nguyen
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2004-11-18 23:57 UTC (permalink / raw)
  Cc: emacs-devel

> i'm ignorant of byte compiler internals, but am under the impression
> that generally compilation of defuns (such as is the case here) does
> not imply their evaluation.

Indeed.  But byte-compilation does execute macros and requires, so sometimes
it leads to such infinite recursions.

> that's one reason to discount possible vc-rcs.el bugginess.  another is
> that the upstream variant[1] of the code byte-compiles and executes w/o
> this error, if i (locally) bump `max-specpdl-size' to 1000.[2]

Ah, now that's more interesting: it's not an infinite recursion, it's only
a deep recursion.  Actually, it seems to be exceeding the default 600 by
just a tiny bit: it fails with 606 but succeeds with 607.

> of course, if you define buggy as "pushes the byte-compiler past its
> comfort level", then sure...

Indeed, it seems to be pushing it a tiny bit "too" far.
I'd suggest we bump the default to 1000.


        Stefan

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

* Re: max-specpdl-size exceeded on "make recompile"
  2004-11-18 23:57     ` Stefan Monnier
@ 2004-11-19 14:19       ` Thien-Thi Nguyen
  2004-11-19 14:32       ` Thien-Thi Nguyen
  1 sibling, 0 replies; 6+ messages in thread
From: Thien-Thi Nguyen @ 2004-11-19 14:19 UTC (permalink / raw)
  Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

   I'd suggest we bump the default to 1000.

how about changing lisp/Makefile.in to read:

recompile: doit $(lisp)/progmodes/cc-mode.elc
	$(EMACS) $(EMACSOPT) \
	  --eval "(setq max-specpdl-size 900)" \
	  --eval "(batch-byte-recompile-directory 0)" \
	  $(lisp)

this increases it only for "make recompile", by the same
amount of the previous increase (according to ChangeLog.7
it was 300 before becoming 600).

thi

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

* Re: max-specpdl-size exceeded on "make recompile"
  2004-11-18 23:57     ` Stefan Monnier
  2004-11-19 14:19       ` Thien-Thi Nguyen
@ 2004-11-19 14:32       ` Thien-Thi Nguyen
  1 sibling, 0 replies; 6+ messages in thread
From: Thien-Thi Nguyen @ 2004-11-19 14:32 UTC (permalink / raw)
  Cc: emacs-devel

oops, i misread `max_lisp_eval_depth' in src/ChangeLog.7.
please disregard the incorrect rationalization.

in any case, thanks for finding the envelope.  i've just installed a
change to lisp/Makefile.in target `recompile', using 650 as a
conservative value for `max-specpdl-size'.

thi

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

end of thread, other threads:[~2004-11-19 14:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-18 21:40 max-specpdl-size exceeded on "make recompile" Thien-Thi Nguyen
2004-11-18 21:25 ` Stefan Monnier
2004-11-18 23:20   ` Thien-Thi Nguyen
2004-11-18 23:57     ` Stefan Monnier
2004-11-19 14:19       ` Thien-Thi Nguyen
2004-11-19 14:32       ` Thien-Thi Nguyen

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).