History log of /seL4-refos-master/libs/libmuslc/src/search/tsearch_avl.c
Revision Date Author Comments
# 3abb094d 05-Dec-2015 Szabolcs Nagy <nsz@port70.net>

fix tsearch, tfind, tdelete to handle null pointer input

POSIX specifies the behaviour for null rootp input, but it
was not implemented correctly.


# 8994908b 05-Dec-2015 Szabolcs Nagy <nsz@port70.net>

tsearch code cleanup

changed the insertion method to simplify the recursion logic and
reduce code size a bit.


# bc974476 05-Dec-2015 Szabolcs Nagy <nsz@port70.net>

fix tsearch to avoid crash on oom

malloc failure was not properly propagated in the insertion method
which led to null pointer dereference.


# e4f9d811 05-Dec-2015 Szabolcs Nagy <nsz@port70.net>

fix tdelete to properly balance the tree

the tsearch data structure is an avl tree, but it did not implement
the deletion operation correctly so the tree could become unbalanced.

reported by Ed Schouten.


# 2d2da648 02-Aug-2013 Rich Felker <dalias@aerifal.cx>

fix aliasing violations in tsearch functions

patch by nsz. the actual object the caller has storing the tree root
has type void *, so accessing it as struct node * is not valid.
instead, simply access the value, move it to a temporary of the
appropriate type and work from there, then move the result back.


# 6255c4c6 12-May-2012 nsz <nsz@port70.net>

search: add comments to tsearch_avl.c


# febbd12d 25-Jun-2011 Rich Felker <dalias@aerifal.cx>

XSI search.h API implementation by Szabolcs Nagy