mirror of
https://github.com/opnsense/src.git
synced 2026-07-09 17:22:27 -04:00
Back in 2015 when I reimplemented these functions to use an AVL tree, I was annoyed by the weakness of the typing of these functions. Both tree nodes and keys are represented by 'void *', meaning that things like the documentation for these functions are an absolute train wreck. To make things worse, users of these functions need to cast the return value of tfind()/tsearch() from 'void *' to 'type_of_key **' in order to access the key. Technically speaking such casts violate aliasing rules. I've observed actual breakages as a result of this by enabling features like LTO. I've filed a bug report at the Austin Group. Looking at the way the bug got resolved, they made a pretty good step in the right direction. A new type 'posix_tnode' has been added to correspond to tree nodes. It is still defined as 'void' for source-level compatibility, but in the very far future it could be replaced by a proper structure type containing a key pointer. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D8205 |
||
|---|---|---|
| .. | ||
| jemalloc | ||
| _Exit.c | ||
| a64l.3 | ||
| a64l.c | ||
| abort.3 | ||
| abort.c | ||
| abs.3 | ||
| abs.c | ||
| alloca.3 | ||
| at_quick_exit.3 | ||
| atexit.3 | ||
| atexit.c | ||
| atexit.h | ||
| atof.3 | ||
| atof.c | ||
| atoi.3 | ||
| atoi.c | ||
| atol.3 | ||
| atol.c | ||
| atoll.c | ||
| bsearch.3 | ||
| bsearch.c | ||
| bsearch_b.c | ||
| cxa_thread_atexit.c | ||
| div.3 | ||
| div.c | ||
| exit.3 | ||
| exit.c | ||
| getenv.3 | ||
| getenv.c | ||
| getopt.3 | ||
| getopt.c | ||
| getopt_long.3 | ||
| getopt_long.c | ||
| getsubopt.3 | ||
| getsubopt.c | ||
| hcreate.3 | ||
| hcreate.c | ||
| hcreate_r.c | ||
| hdestroy_r.c | ||
| heapsort.c | ||
| heapsort_b.c | ||
| hsearch.h | ||
| hsearch_r.c | ||
| imaxabs.3 | ||
| imaxabs.c | ||
| imaxdiv.3 | ||
| imaxdiv.c | ||
| insque.3 | ||
| insque.c | ||
| l64a.c | ||
| labs.3 | ||
| labs.c | ||
| ldiv.3 | ||
| ldiv.c | ||
| llabs.3 | ||
| llabs.c | ||
| lldiv.3 | ||
| lldiv.c | ||
| lsearch.3 | ||
| lsearch.c | ||
| Makefile.inc | ||
| memory.3 | ||
| merge.c | ||
| mergesort_b.c | ||
| ptsname.3 | ||
| ptsname.c | ||
| qsort.3 | ||
| qsort.c | ||
| qsort_r.c | ||
| quick_exit.3 | ||
| quick_exit.c | ||
| radixsort.3 | ||
| radixsort.c | ||
| rand.3 | ||
| rand.c | ||
| random.3 | ||
| random.c | ||
| reallocarray.3 | ||
| reallocarray.c | ||
| reallocf.3 | ||
| reallocf.c | ||
| realpath.3 | ||
| realpath.c | ||
| remque.c | ||
| strfmon.3 | ||
| strfmon.c | ||
| strtod.3 | ||
| strtoimax.c | ||
| strtol.3 | ||
| strtol.c | ||
| strtoll.c | ||
| strtonum.3 | ||
| strtonum.c | ||
| strtoq.c | ||
| strtoul.3 | ||
| strtoul.c | ||
| strtoull.c | ||
| strtoumax.c | ||
| strtouq.c | ||
| Symbol.map | ||
| system.3 | ||
| system.c | ||
| tdelete.c | ||
| tfind.c | ||
| tsearch.3 | ||
| tsearch.c | ||
| tsearch_path.h | ||
| twalk.c | ||