From 83a048424ab50fda3853f3d71dc884879858cbf4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 28 Aug 1998 12:05:05 +0000 Subject: [PATCH] (_dl_open): Correct test for extending global scope array. --- elf/dl-open.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/elf/dl-open.c b/elf/dl-open.c index c093e543027..b343bc31a68 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -119,7 +119,7 @@ _dl_open (const char *file, int mode) else { if (_dl_global_scope_alloc < - (size_t) (_dl_global_scope_end - _dl_global_scope + 2)) + (size_t) (_dl_global_scope_end - _dl_global_scope + 3)) { /* Must extend the list. */ struct link_map **new = realloc (_dl_global_scope, @@ -160,5 +160,10 @@ _dl_open (const char *file, int mode) has loaded a dynamic object now has competition. */ __libc_multiple_libcs = 1; +#ifndef MAP_COPY + /* We must munmap() the cache file. */ + _dl_unload_cache (); +#endif + return new; } -- 2.47.2