[cl-containers-devel] Re: bug in cl-containers?
Gary King
gwking at metabang.com
Fri Feb 10 14:05:27 UTC 2006
Hi Karol,
I will look into this shortly.
thanks,
On Feb 10, 2006, at 8:00 AM, karol skocik wrote:
> Hi Gary,
> I wanted to play with your libraries, namely cl-containers, but it
> behaves strange on SBCL 0.98/Linux x86
>
> When I want to use heap-container, and want to insert new item :
>
> CL-USER> (defvar *heap* (make-instance 'cl-containers:heap-container))
> *HEAP*
> CL-USER> (cl-containers:insert-new-item *heap* 10)
> Control stack guard page temporarily disabled: proceed with caution
>
> In the debugger :
> 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.
> [Condition of type SB-KERNEL::CONTROL-STACK-EXHAUSTED]
>
> Restarts:
> 0: [ABORT-REQUEST] Abort handling SLIME request.
> 1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread"
> {B100459}>)
>
>
> Backtrace:
> 0: (SB-KERNEL::CONTROL-STACK-EXHAUSTED-ERROR)
> 1: ("foreign function: call_into_lisp")
> 2: ("foreign function: post_signal_tramp")
> 3: (SB-PCL::CHECK-APPLICABLE-KEYWORDS 0 -309154813 2)
> 4: ("foreign function: #x0")
> 5: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL.
> SB-PCL::.ARG0. SB-PCL::.ARG1. SB-PCL::.DFUN-REST-ARG.)) #<error
> printing object>)
> 6: ((SB-PCL::FAST-METHOD METABANG.CL-CONTAINERS:INSERT-ITEM
> (METABANG.CL-CONTAINERS:HEAP-CONTAINER T)) #<error printing object>)
> 7: ((SB-PCL::FAST-METHOD METABANG.CL-CONTAINERS:INSERT-ITEM
> (METABANG.CL-CONTAINERS:CONTAINER-USES-NODES-MIXIN T)) #<error
> printing
> object>)
> 8: ((SB-PCL::FAST-METHOD METABANG.CL-CONTAINERS:INSERT-ITEM
> (METABANG.CL-CONTAINERS:HEAP-CONTAINER T)) #<error printing object>)
> 9: ((SB-PCL::FAST-METHOD METABANG.CL-CONTAINERS:INSERT-ITEM
> (METABANG.CL-CONTAINERS:CONTAINER-USES-NODES-MIXIN T)) #<error
> printing
> object>)
>
> calls like 8 a 9 are repeating and repeating and repeating....
>
> when I use (cl-containers:insert-item *heap* 10) instead, the
> result is
> the same...
>
> --- I have posted this on c.l.l., and one guy wrote me this :
>
> I might be wrong, but I think the following code is incorrect:
> (defmethod insert-item ((container container-uses-nodes-mixin) (item
> t))
> (let ((node (make-node-for-container container item)))
> (values (insert-item container node)
> node)))
>
> Seems like a direct recursion, so one gets a stac overflow.
> Substituting the insert-item with call-next-method works for me.
>
> (defmethod insert-item ((container container-uses-nodes-mixin) (item
> t))
> (let ((node (make-node-for-container container item)))
> (values (call-next-method container node)
> node)))
>
> Do you think that it is a valid problem? If yes, can you patch the
> cl-containers, please?
>
> Thank you and have a nice day,
> Karol
--
Gary Warren King
metabang.com
http://www.metabang.com/
More information about the cl-containers-devel
mailing list