sb-kernel::%type-union stack exhaustion on bad defun
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
The following code does not drop me into the debugger in sbcl2.3.6
(defun check(expr &key predicate)
(if predicate
(list (check expr) predicate)
(if (atom expr) t
(check (first expr)))))
(defmacro ucheck(expr predicate)
(check expr :predicate predicate))
(defconstant +comparisonops+ `(,#'< = ,#'= ,#'eql ,#'equalp))
(defun es() (ucheck 5 (member w +comparisonops+)))
but in versions 2.3.7 through 2.3.9 I get:
CHECK
* UCHECK
* +COMPARISONOPS+
* INFO: Control stack guard page unprotected
Control stack guard page temporarily disabled: proceed with caution
debugger invoked on a SB-KERNEL:
#<THREAD tid=2155644 "main thread" RUNNING {10044A00A3}>:
Control stack exhausted (no more space for function call frames).
This is probably due to heavily nested or infinitely recursive function
calls, or a tail call that SBCL cannot or has not optimized away.
PROCEED WITH CAUTION.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(SB-KERNEL:
0]
Looking through the backtrace I see a lot of:
1079: (SB-KERNEL:
1080: (SB-KERNEL:
1081: (SB-KERNEL:
1082: (SB-KERNEL:
1083: (SB-KERNEL:
uname -a gives:
Linux papias 6.2.0-33-generic #33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 7 10:33:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
I understand the above code is clearly buggy, but I don't think sbcl should exhaust the stack in this case.
Changed in sbcl: | |
status: | New → Incomplete |
status: | Incomplete → Fix Committed |