I have set the stack cushion (see sys:set-stack-cushion and sys:stack-cushion) to a reasonable value, but the soft stack limit is not being detected, and I get a lisp death instead. Why is that?
The stack-cushion (see sys:set-stack-cushion and sys:stack-cushion) is detected in “symbol trampoline”, a short piece of code that is used when one Lisp function calls another. It is meant to flag normal situations where stack is growing too quickly, and to signal a condition before a hard stack-size limit is reached. There are several possible situations where the stack-overflow is not detected by this mechanism, and careful thought must be given as to how to handle it: • A lisp function may allocate a very large stack size, due to either a large number of variables or due to large stack-allocated arrays or lists. If the amount that the function allocates is larger than the difference between the hard stack limit and the soft stack limit set up by the stack cushion, then there will be no chance for the Lisp to signal the condition before the hard limit is reached. The only way to work around this problem is to be sure that there is sufficient stack-cushion for the worst-case function
Related Questions
- I have set the stack cushion (see sys:set-stack-cushion and sys:stack-cushion) to a reasonable value, but the soft stack limit is not being detected, and I get a lisp death instead. Why is that?
- Will allowing the addition of caffeine to any carbonated soft drink limit the availability of non-caffeinated soft drinks for consumers who must or wish to avoid caffeine?
- Is there any limit on the value of Individual transactions in ECS Debit?