#936: Cactus binary tree implementation in src/util/BinaryTree.c is broken ----------------------+----------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: optional | Milestone: Component: Cactus | Version: Keywords: | ----------------------+----------------------------------------------------- It contains an obvious bug of the form: {{{ int i = something;
if(i<0) {...} else if(i>0) {...} else if(i==0} {...} else {do something else} }}} which is clearly nonsensical (this is the second half of the patch). It also triggers segfaults since it blindly recurses into NULL pointers.
The second one concerns adding elements into the tree, which always compares to the prospective subtree's parent rather than the subtree itself.
No thorn seems to use these functions right now, nor are they documented.