walnux/libs
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
..
libbuiltin compiler-rt: distclean delete error 2025-07-03 00:17:58 +08:00
libc libc/idr: Remove nodes from RB trees during destroy 2025-07-12 14:24:32 +08:00
libdsp style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
libm libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
libnx style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
libxx style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
CMakeLists.txt libs: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00