From 119aabcb74c9644e3a6d03d6f87d8d9aba6d35a7 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 22 Jun 2025 16:07:47 +0000 Subject: lt_dlopen(): properly handle multiple attempts to preload the same symbol table. --- src/core/lt_path.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core') diff --git a/src/core/lt_path.c b/src/core/lt_path.c index 2017a95..0991e95 100644 --- a/src/core/lt_path.c +++ b/src/core/lt_path.c @@ -409,6 +409,11 @@ static struct lt_modctx * lt_dlopen_locked( } } + /* symbol table already preloaded? */ + for (modctx=lt_modv_head; symtbl && modctx; modctx=modctx->mnext) + if (modctx->symtbl == symtbl) + return modctx; + /* module or symtbl entry */ modctx = lt_modv_next; modctx->symtbl = symtbl; -- cgit v1.2.3