walnux/libs/libc
George Poulios c4541a4d4c libc/idr: Remove nodes from RB trees during destroy
idr_destroy() would loop over the removed and alloced
RB tree nodes freeing them but not removing them from
the trees. From the perspective of the RB tree those
nodes would remain valid, while in fact, they were free
memory, potentially reallocated for other purposes, or
otherwise overwritten by the allocator with metadata.
This would cause (seemingly random) memory corruption
crashes triggered by the RB tree code trying to access
link fields from the free'd nodes.

Fix that by removing the nodes before freeing them.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-07-12 14:24:32 +08:00
..
aio style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
assert libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
audio libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
builtin libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
ctype style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
dirent cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
dlfcn libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
elf style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
errno libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
eventfd libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
fdt libs/libc/fdt/Make.defs: cannot move due to directory not empty bugfix 2024-10-09 15:42:17 +08:00
fixedmath libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
gdbstub style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
gnssutils libc/gnssutils: remove C99 standard flag from Make.defs 2025-01-17 09:03:18 +08:00
grp libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
hex2bin stream_getc: use lib_stream_eof instead of EOF 2024-11-26 10:25:36 +08:00
inttypes libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
libgen libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
locale libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
lzf libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
machine libc/mcount: compatible with armv6m mcount implementation 2025-07-10 18:06:03 +08:00
misc libc/idr: Remove nodes from RB trees during destroy 2025-07-12 14:24:32 +08:00
net libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
netdb netdb/lib_dnsquery.c: In the IPv6 or IPv4 dns_query_callback() block, 2025-06-23 11:56:15 -03:00
obstack stream: reduce int use, handle FS_LARGEFILE correctly. 2024-11-15 01:05:04 +08:00
pthread libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
pwd libs/libc/unistd: add getspnam function 2024-10-16 11:15:25 +08:00
queue libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
regex style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
sched style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
search libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
semaphore libc/semaphore: Go the fast path even arch doesn't support atomic 2025-07-08 09:47:44 -03:00
signal cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
spawn cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
stdio libc: Move stdio/README to Documentation/components/libs/libc/stream.rst 2025-06-22 17:07:41 -03:00
stdlib style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
stream libc: lib_bsprintf reuse var instead value for string 2025-06-20 09:48:39 +08:00
string style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
symtab lib_libvsprintf.c:add option in Kconfig to control "%p*" special format specifier. 2024-10-15 15:33:13 +08:00
syslog drivers/syslog: Add RFC 5424 protocol support 2025-06-13 20:26:57 +08:00
termios libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
time libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
tls libc: Add debug assert to prevent tls allocation failure 2024-10-18 21:34:18 +08:00
uio move readv/writev to the kernel 2024-10-30 17:07:54 +08:00
unistd libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
userfs style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
uuid libc: Refine the arc4random_buf implementation 2024-10-26 18:04:21 -03:00
wchar style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
wctype libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
wqueue libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
zoneinfo libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
.gitignore libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
CMakeLists.txt libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
Kconfig libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
libc.csv nuttx: add get_current_dir_name implementation 2024-12-19 20:55:51 +08:00
libc.h libc/machine:Add prefixes to libc functions implemented by arch 2024-10-31 18:11:16 +08:00
Makefile libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00