Files
Konstantin Belousov ed059dbfe2 rtld: free heap donelists abandoned by the lookup restart
A symbol lookup done under the read-locked rtld_bind_lock is restarted
with the write lock when it needs to load filtees.  The restart is done
by siglongjmp() from lock_restart_for_upgrade(), which skips
donelist_free() for the heap donelists of the unwound frames.  Only
do_dlsym() freed one such donelist, tracked by SymLook.donelist_mem.
The donelist of symlook_default() called from _rtld_bind(), the
donelist of get_program_var_addr() called for dlopen(RTLD_TRACE), and
the donelists of nested symlook_obj_load_filtees() calls were leaked.

Link the heap donelists allocated under the read lock into the list
owned by RtldLockState, which also owns the sigjmp_buf, instead of the
symlook request.

Fixes:	1e370f0387 ("rtld: stop using unbound alloca()")
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2026-10-29 17:55:37 +02:00
..
2026-01-09 11:28:43 -05:00
2023-08-16 11:54:16 -06:00
2023-08-16 11:54:23 -06:00
2023-08-16 11:54:23 -06:00
2025-08-08 10:30:16 +01:00
2024-10-14 10:26:17 -07:00
2026-10-29 17:55:37 +02:00