Dear Bug Team!
Here's a byte-compiler bug of appears to be an infinite loop while
trying to inline a recursive function.
Create the following two files in any directory:
compile-me.el:
----------
(eval-when (compile) (push "." load-path))
(require 'definition)
(defun bar (arg)
(foo arg))
----------
definition.el:
----------
(provide 'definition)
(defsubst foo (arg)
(if arg
(foo nil)))
----------
Then from that directory, run "xemacs compile-me.el". Once it's
loaded, execute M-x byte-compile-buffer.
This results in an error:
Compiling buffer compile-me.el at Tue Jun 10 12:34:49 2003
While compiling bar:
!! error (("Variable binding depth exceeds max-specpdl-size"))
I'm guessing that the compilation of bar() caused foo() to be inlined
into it, and that the byte-compiler then tried to inline foo() into
itself recursively.
Note that this error doesn't appear if you simply place foo and bar in
the same file:
doesnt-fail.el:
----------
(defsubst foo (arg)
(if arg
(foo nil)))
(defun bar (arg)
(foo arg))
----------
Using load instead of require, however, DOES cause an error:
compile-me-still-crashes.el:
----------
(eval-when (compile) (progn (push "." load-path)
(load "definition.el")))
(defun bar (arg)
(foo arg))
----------
Note that I'm using a patched version of XEmacs 21.4.12 on Darwin.
However, I hear that this bug occurs on 21.4.13/Linux as well.
-Michael
================================================================
System Info to help track down your bug:
---------------------------------------
uname -a: Darwin Rerenosubject.local. 6.6 Darwin Kernel Version 6.6: Thu May 1 21:48:54
PDT 2003; root:xnu/xnu-344.34.obj~1/RELEASE_PPC Power Macintosh powerpc
./configure '--prefix=/Users/toomim/local' '--with-modules=yes'
'--site-includes=/sw/include' '--site-libraries=/sw/lib'
XEmacs 21.4.12 "Portable Code" configured for `powerpc-apple-darwin6.6'.
Compilation / Installation:
Source code location: /Users/toomim/downloads/xemacs-21.4
Installation prefix: /Users/toomim/local
Additional header files: /sw/include
Additional libraries: /sw/lib
Operating system description file: `s/darwin.h'
Machine description file: `m/powerpc.h'
Compiler: gcc -g -O3 -Wall -Wno-switch -Winline
-Wmissing-prototypes -Wsign-compare -Wshadow -Wpointer-arith
Relocating allocator for buffers: no
GNU version of malloc: no
- The GNU allocators don't work with this system configuration.
Window System:
Compiling in support for the X window system:
- X Windows headers location: /usr/X11R6/include
- X Windows libraries location: /usr/X11R6/lib
- Handling WM_COMMAND properly.
Compiling in support for the Athena widget set:
- Athena headers location: X11/Xaw
- Athena library to link: Xaw
Using Lucid menubars.
Using Lucid scrollbars.
Using Athena dialog boxes.
Using Athena native widgets.
TTY:
Compiling in support for ncurses.
Images:
Compiling in support for GIF images (builtin).
Compiling in support for XPM images.
Compiling in support for PNG images.
Compiling in support for JPEG images.
Compiling in support for TIFF images.
Sound:
Databases:
Compiling in support for DBM.
Compiling in support for LDAP.
Internationalization:
Mail:
Compiling in support for "dot-locking" mail spool file locking method.
Other Features:
Inhibiting IPv6 canonicalization at startup.
Compiling in support for dynamic shared object modules.
Using the new portable dumper.
Load-Path Lisp Shadows:
----------------------
nil
Installed XEmacs Packages:
-------------------------
((zenirc:version 1.13 :type regular)
(xslt-process :version 1.11 :type regular)
(xslide :version 1.03 :type regular)
(xemacs-devel :version 1.48 :type single-file)
(xemacs-base :version 1.71 :type regular)
(w3 :version 1.26 :type regular)
(vm :version 7.07 :type regular)
(viper :version 1.35 :type regular)
(view-process :version 1.12 :type regular)
(vhdl :version 1.15 :type regular)
(vc-cc :version 1.21 :type regular)
(vc :version 1.33 :type regular)
(tramp :version 1.1 :type regular)
(tpu :version 1.12 :type regular)
(tooltalk :version 1.13 :type regular)
(tm :version 1.34 :type regular)
(time :version 1.12 :type regular)
(textools :version 1.13 :type regular)
(text-modes :version 1.55 :type single-file)
(texinfo :version 1.21 :type regular)
(supercite :version 1.19 :type regular)
(strokes :version 1.08 :type regular)
(speedbar :version 1.24 :type regular)
(sounds-wav :version 1.1 :type regular)
(sounds-au :version 1.1 :type regular)
(sml-mode :version 0.05 :type regular)
(slider :version 1.13 :type regular)
(sieve :version 1.1 :type regular)
(sh-script :version 1.16 :type regular)
(sgml :version 1.08 :type regular)
(semantic :version 1.14 :type regular)
(scheme :version 1.12 :type regular)
(sasl :version 1.12 :type regular)
(ruby-modes :version 1.0 :type single-file)
(rmail :version 1.13 :type regular)
(reftex :version 1.28 :type regular)
(python-modes :version 1.01 :type single-file)
(psgml-dtds :version 1.02 :type regular)
(psgml :version 1.35 :type regular)
(ps-print :version 1.08 :type regular)
(prog-modes
:version
1
.67
:type
single-file)
(pgg :version 1.01 :type regular)
(perl-modes :version 1.02 :type single-file)
(pcomplete :version 1.02 :type regular)
(pcl-cvs :version 1.64 :type regular)
(pc :version 1.25 :type single-file)
(os-utils :version 1.29 :type single-file)
(ocaml :version 0.03 :type regular)
(net-utils :version 1.28 :type single-file)
(mmm-mode :version 1.0 :type regular)
(misc-games :version 1.15 :type single-file)
(mine :version 1.14 :type regular)
(mh-e :version 1.16 :type regular)
(mew :version 1.17 :type regular)
(mailcrypt :version 2.12 :type regular)
(mail-lib :version 1.54 :type regular)
(liece :version 1.1 :type regular)
(jde :version 1.38 :type regular)
(ispell :version 1.24 :type regular)
(ilisp :version 1.28 :type regular)
(igrep :version 1.1 :type regular)
(idlwave :version 1.27 :type regular)
(ibuffer :version 1.08 :type regular)
(hm--html-menus :version 1.18 :type regular)
(haskell-mode :version 1.03 :type regular)
(gnus :version 1.64 :type regular)
(gnats :version 1.15 :type regular)
(games :version 1.13 :type regular)
(fsf-compat :version 1.11 :type single-file)
(frame-icon :version 1.09 :type regular)
(fortran-modes :version 1.01 :type single-file)
(forms :version 1.14 :type regular)
(footnote :version 1.15 :type regular)
(eudc :version 1.36 :type regular)
(eterm :version 1.13 :type regular)
(ess :version 1.02 :type regular)
(eshell :version 1.03 :type regular)
(emerge :version 1.09 :type regular)
(elib :version 1.1 :type single-file)
(eieio :version 1.03 :type regular)
(efs :version 1.29 :type regular)
(edt :version 1.12 :type regular)
(edit-utils :version 1.95 :type single-file)
(ediff :version 1.44 :type regular)
(edebug :version 1.14 :type regular)
(ecrypto :version 0.12 :type regular)
(docbookide :version 0.05 :type regular)
(dired :version 1.12 :type regular)
(dictionary :version 1.11 :type regular)
(debug :version 1.16 :type regular)
(crisp :version 1.12 :type regular)
(cookie :version 1.14 :type regular)
(clearcase :version 1.04 :type regular)
(cc-mode :version 1.31 :type regular)
(calendar :version 1.19 :type regular)
(calc :version 1.23 :type regular)
(c-support :version 1.16 :type single-file)
(build :version 1.07 :type regular)
(bbdb :version 1.21 :type regular)
(auctex :version 1.32 :type regular)
(apel :version 1.25 :type regular)
(ada :version 1.11 :type regular))
Features:
--------
(mail-abbrevs xemacsbug shadow sendmail rfc822 errdef byte-optimize
bytecomp byte-compile efs-cu font disp-table paren blink-paren
blink-cursor font-lock jka-compr flyspell cus-face ispell
zenirc-autoloads xslt-process-autoloads xslide-autoloads
xemacs-devel-autoloads xemacs-base-autoloads w3-autoloads vm-autoloads
viper-autoloads view-process-autoloads vhdl-autoloads vc-cc-autoloads
vc-autoloads tramp-autoloads tpu-autoloads tooltalk-autoloads
tm-autoloads time-autoloads textools-autoloads text-modes-autoloads
texinfo-autoloads supercite-autoloads strokes-autoloads
speedbar-autoloads sounds-wav-autoloads sounds-au-autoloads
sml-mode-autoloads slider-autoloads sieve-autoloads
sh-script-autoloads sgml-autoloads semantic-autoloads scheme-autoloads
sasl-autoloads ruby-modes-autoloads rmail-autoloads reftex-autoloads
python-modes-autoloads psgml-dtds-autoloads psgml-autoloads
ps-print-autoloads prog-modes-autoloads pgg-autoloads
perl-modes-autoloads pcomplete-autoloads pcl-cvs-autoloads
pc-autoloads os-utils-autoloads ocaml-autoloads net-utils-autoloads
mmm-mode-autoloads misc-games-autoloads mine-autoloads mh-e-autoloads
mew-autoloads mailcrypt-autoloads mail-lib-autoloads liece-autoloads
jde-autoloads ispell-autoloads ilisp-autoloads igrep-autoloads
idlwave-autoloads ibuffer-autoloads hm--html-menus-autoloads
haskell-mode-autoloads gnus-autoloads gnats-autoloads games-autoloads
fsf-compat-autoloads frame-icon-autoloads fortran-modes-autoloads
forms-autoloads footnote-autoloads eudc-autoloads eterm-autoloads
ess-autoloads eshell-autoloads emerge-autoloads elib-autoloads
eieio-autoloads efs-autoloads edt-autoloads edit-utils-autoloads
ediff-autoloads edebug-autoloads ecrypto-autoloads
docbookide-autoloads dired-autoloads dictionary-autoloads
debug-autoloads crisp-autoloads cookie-autoloads clearcase-autoloads
cc-mode-autoloads calendar-autoloads calc-autoloads
c-support-autoloads build-autoloads bbdb-autoloads auctex-autoloads
apel-autoloads ada-autoloads lisp-autoloads loadhist auto-show
fontl-hooks x-iso8859-1 gutter-items menubar-items x-menubar
mode-motion mouse itimer auto-save lisp-mode easymenu iso8859-1 page
buff-menu lib-complete help-nomule cus-file derived frame text-props
obsolete cus-start custom widget cl-extra mini-cl cl cl-19 packages
backquote very-early-lisp lucid-scrollbars cut-buffer lucid-menubars
athena-dialogs x c-balloon-help tty-frames tty toolbar scrollbar
unix-processes multicast network-streams subprocesses modules
menu-accelerator-support menubar dbm md5 xemacs gutter tiff png gif
jpeg xpm xbm lisp-float-type darwin dialog devices window-system
base64)
Recent keystrokes:
-----------------
M-x b y t TAB c o m TAB b TAB RET RET M-x r e p o TAB
r TAB e BS x e m TAB RET
Recent messages (most recent first):
-----------------------------------
Loading xemacsbug...done
Loading xemacsbug...
Making completion list...
Variable binding depth exceeds max-specpdl-size
Compiling errcomp.el... (bar)
Loading byte-optimize...done
Loading byte-optimize...
Compiling errcomp.el...
Loading bytecomp...done
Loading bytecomp...
Fontifying errcomp.el... done.
Loading efs-cu...done
Fontifying errcomp.el... (regexps)........
Fontifying errcomp.el... (regexps)...
Fontifying errcomp.el... (syntactically).
Fontifying errcomp.el...
Fontifying *scratch*... done.
Loading efs-cu...
Loading font...done
Loading font...