mirror of
https://github.com/opnsense/src.git
synced 2026-07-12 02:26:14 -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 |
||
|---|---|---|
| .. | ||
| aarch64 | ||
| amd64 | ||
| arm | ||
| capability | ||
| compat-43 | ||
| db | ||
| gdtoa | ||
| gen | ||
| gmon | ||
| i386 | ||
| iconv | ||
| include | ||
| inet | ||
| isc | ||
| locale | ||
| md | ||
| mips | ||
| nameser | ||
| net | ||
| nls | ||
| posix1e | ||
| powerpc | ||
| powerpc64 | ||
| quad | ||
| regex | ||
| resolv | ||
| riscv | ||
| rpc | ||
| secure | ||
| softfloat | ||
| sparc64 | ||
| stdio | ||
| stdlib | ||
| stdtime | ||
| string | ||
| sys | ||
| tests | ||
| uuid | ||
| x86/sys | ||
| xdr | ||
| yp | ||
| libc.ldscript | ||
| libc_nossp.ldscript | ||
| Makefile | ||
| Makefile.depend | ||
| Versions.def | ||