Setting max-specpdl-size of 34295 allows segfaults with 'simple' elisp
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
emacs23 (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
emacs24 (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
emacs25 (Debian) |
New
|
Unknown
|
|||
emacs25 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: emacs23
Setting max-specpdl-size higher than 34295, and then running the following code results in a segfault of emacs. I am
running a system of mostly 9.04 with some packages (such as this one) upgraded. I know it's kind of pushing emacs to the limit, but still; this seems like an arbitrary limit on emacs' otherwise diety-like functionality. What should happen is emacs should continue to fail to execute with "file-truename: Variable binding depth exceeds max-specpdl-size" as it does below 34295., or at the very least when setting max-specpdl-size higher than 34295 it should warn you that you are making some kind of error if this is not acceptable.
example code:
(defun por (pcurrent pb numberleft)
(if (= numberleft 0)
pcurrent
(por (- (+ pcurrent pb) (* pcurrent pb)) pb (- numberleft 1))))
(por 0 0.01 10000)
(setq max-lisp-eval-depth 1000000) ; this may be necessary, but doesn't appear to be the problem
(setq max-specpdl-size 34295) ; setting this lower results in predictable, expected behaviour - emacs refuses to run the result, citing max-specpdl-size not high enough. Setting this higher (like...34296), results in a segfault of emacs
emacs23:
Installé : 23.1+1-4ubuntu3
Candidat : 23.1+1-4ubuntu3
Table de version :
*** 23.1+1-4ubuntu3 0
100 /var/lib/
ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: emacs23 23.1+1-4ubuntu3
ProcEnviron:
PATH=(custom, user)
LANG=fr_CA.UTF-8
SHELL=/bin/bash
SourcePackage: emacs23
Uname: Linux 2.6.28-16-generic x86_64
UnreportableReason: Ceci n'est pas un authentique paquet Ubuntu
tags: | added: yakkety |
tags: | added: artful |
Changed in emacs25 (Debian): | |
status: | Unknown → New |
tags: | added: cosmic |
Changed in emacs25 (Ubuntu): | |
status: | Fix Committed → Fix Released |
should be (por 0 0.01 100000)