(nth-value n form) with n greater ~4000 lets sbcl crash
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
on windows x86 64 the evaluation of:
(nth-value n form) with n greater 4000 lets sbcl crash immediately.
Nobody would need a value with a n so big. But a bug in my code showed me this error.
c.
sbcl version: 1.2.7
(:SWANK :CL-FAD :BORDEAUX-THREADS CFFI-FEATURES:
CFFI-FEATURES:
:WINDOWS :SPLIT-SEQUENCE CHIPZ-SYSTEM:
:ASDF-
:NON-BASE-
:ASH-RIGHT-VOPS :C-STACK-
:COMPLEX-
:IEEE-
:LITTLE-ENDIAN :MEMORY-
:OS-PROVIDES-PUTWC :PACKAGE-
:SB-DYNAMIC-CORE :SB-EVAL :SB-FUTEX :SB-LDB :SB-PACKAGE-LOCKS :SB-QSHOW
:SB-SAFEPOINT :SB-SAFEPOINT-
:SB-TEST :SB-THREAD :SB-THRUPTION :SB-UNICODE :SB-WTIMER :SBCL
:STACK-
:STACK-
:STACK-
:UNWIND-
Changed in sbcl: | |
assignee: | nobody → Douglas Katzman (dougk) |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
assignee: | Douglas Katzman (dougk) → nobody |
tested it on x64 linux.
the stack gets exhausted by a mutual recursion in the compiler, but here the stack guard keeps things alive.
it's basically an inefficient implementation, and a resource hungry error handler at stack exhaustion can finish off the vm.
4: (SB-C:: IR1-CONVERT- HAIRY-ARGS #<SB-C: :OPTIONAL- DISPATCH :%SOURCE-NAME SB-C::.ANONYMOUS. :%DEBUG-NAME (LAMBDA (&OPTIONAL #1=#:G13138 #2=#:G13139 #3=#:G13140 #4=#:G13141 #5=#:G13142 ...)) :TYPE #<SB-KER.. GENERATE- OPTIONAL- DEFAULT- ENTRY #<SB-C: :OPTIONAL- DISPATCH :%SOURCE-NAME SB-C::.ANONYMOUS. :%DEBUG-NAME (LAMBDA (&OPTIONAL #1=#:G13138 #2=#:G13139 #3=#:G13140 #4=#:G13141 #5=#:G13142 ...)) :TYPE.. IR1-CONVERT- HAIRY-ARGS #<SB-C: :OPTIONAL- DISPATCH :%SOURCE-NAME SB-C::.ANONYMOUS. :%DEBUG-NAME (LAMBDA (&OPTIONAL #1=#:G13138 #2=#:G13139 #3=#:G13140 #4=#:G13141 #5=#:G13142 ...)) :TYPE #<SB-KER.. GENERATE- OPTIONAL- DEFAULT- ENTRY #<SB-C: :OPTIONAL- DISPATCH :%SOURCE-NAME SB-C::.ANONYMOUS. :%DEBUG-NAME (LAMBDA (&OPTIONAL #1=#:G13138 #2=#:G13139 #3=#:G13140 #4=#:G13141 #5=#:G13142 ...)) :TYPE..
5: (SB-C::
6: (SB-C::
7: (SB-C::