[cl-containers-devel] Possible RB-Tree bug in latest release
Gary King
gwking at metabang.com
Mon Mar 19 02:43:44 UTC 2007
Hi Modius,
I've verified the incorrect behavior and believe I have a fix; FWIW,
the problem is only with the size method. Anything involving the
contents of the red-black tree should work fine.
I'll try to get the patch out sometime tomorrow. Thanks again for
your report.
On Mar 18, 2007, at 1:53 AM, Modius Roman wrote:
>
> I apologize in advance if I am misusing the library.
>
> I'm running in Win32 on Lispworks with a bunch of dependencies
> loaded through ASDF.
>
> I have the GZipped Tar file referenced on the CL-Containers
> download page.
>
>
> Easy repetition of the bug:
>
> (setf m (make-instance 'Red-Black-Tree))
> (insert-item m 31)
> (size m) ; returns 1 as expected
> (delete-item m 31)
> (size m) ; Should return 0, returns 1 instead.
> (collect-elements m)
>
> Size returns 1, element list is empty. Size never decrements - put
> insert/delete in a loop of a million, size will become a million.
>
> Replace the top line with
> (setf m (make-instance 'binary-search-tree))
>
> And the size goes up and down with insert/delete, as expected.
>
>
> I'd chase it down; but my lisp isn't incredibly strong and I figure
> the authors could track this down in 5 minutes. . . .
>
>
> Thanks,
> Matt
>
>
>
> _______________________________________________
> cl-containers-devel mailing list
> cl-containers-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/cl-containers-devel
--
Gary Warren King, metabang.com
Cell: (413) 885 9127
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cl-containers-devel/attachments/20070318/f824f975/attachment.html>
More information about the cl-containers-devel
mailing list