[cl-containers-devel] Possible RB-Tree bug in latest release

Modius Roman modius.roman at gmail.com
Sun Mar 18 05:53:43 UTC 2007


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cl-containers-devel/attachments/20070318/86df5bbf/attachment.html>


More information about the cl-containers-devel mailing list