2009/9/10 Volkan YAZICI <yazicivo@...>:
> While making an FFI call SBCL complains that "Binding stack is
> exhausted. Proceed with caution.". What does this error mean? What would
> be the cause of it? (BTW, related shared library function uses Boehm GC
> for memory allocations.)
Binding stack is the place where information about dynamic bindings is stored:
(let ((*print-length* 42)) (foo))
if it is apparently exhausted during an FFI call, the most likely
problem to my mind is the foreign function working on bogus memory
addresses and accidentally touching the binding stack guard page --
which results in the stack exhaustion error. In this case figuring out
where the pointers go astray is the way forward.
The other alternative is that your binding stack is almost exhausted
anyways, and the FFI call pushes one more binding for
SB-C::*SAVED-FP-AND-PCS*, which breaks the back of the proverbial
camel. In this case you need to either reduce your stack binding stack
consumption, or increase the BINDING_STACK_SIZE in
src/runtime/validate.h and recompile SBCL.
Cheers,
-- Nikodemus
|