NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/43645: copy-paste bug in rb_tree_find_node_geq or rb_tree_find_node_leq

>Number:         43645
>Category:       lib
>Synopsis:       copy-paste bug in rb_tree_find_node_geq or 
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 20 17:00:01 +0000 2010
>Originator:     Jeremy Huddleston
>Release:        cvs
In working on fixing the comparator problem in PR-43488, I noticed that there 
is an inconsistency in rb_tree_find_node_geq and rb_tree_find_node_leq.

Based on the inverted nature of these two functions, one would assume their 
search pattern would be simply inverted, but it looks like their is a 
copy/paste bug in choosing the next node to look at in the itteration.

I haven't created a test case.  It seems obvious by observation.
Change the comparator of one of them... not sure which to say because the 
comparators are currently inverted as it is (PR-43488),

Home | Main Index | Thread Index | Old Index