diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-04-21 19:49:51 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-04-21 19:49:51 +0200 |
commit | fada9018199c21c469ff0e731ef75c6020074ac9 (patch) | |
tree | 92a5914178f7acac985fd4ce15d4e7ee99522e9d /dlfcn/Makefile | |
parent | b2964eb1d9a6b8ab1250e8a881cf406182da5875 (diff) | |
download | glibc-fada9018199c21c469ff0e731ef75c6020074ac9.zip glibc-fada9018199c21c469ff0e731ef75c6020074ac9.tar.gz glibc-fada9018199c21c469ff0e731ef75c6020074ac9.tar.bz2 |
dlfcn: dlerror needs to call free from the base namespace [BZ #24773]
Calling free directly may end up freeing a pointer allocated by the
dynamic loader using malloc from libc.so in the base namespace using
the allocator from libc.so in a secondary namespace, which results in
crashes.
This commit redirects the free call through GLRO and the dynamic
linker, to reach the correct namespace. It also cleans up the dlerror
handling along the way, so that pthread_setspecific is no longer
needed (which avoids triggering bug 24774).
Diffstat (limited to 'dlfcn/Makefile')
-rw-r--r-- | dlfcn/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dlfcn/Makefile b/dlfcn/Makefile index d51fd08..994a3af 100644 --- a/dlfcn/Makefile +++ b/dlfcn/Makefile @@ -22,9 +22,10 @@ include ../Makeconfig headers := bits/dlfcn.h dlfcn.h extra-libs := libdl libdl-routines := dlopen dlclose dlsym dlvsym dlerror dladdr dladdr1 dlinfo \ - dlmopen dlfcn dlfreeres + dlmopen dlfcn routines := $(patsubst %,s%,$(filter-out dlfcn,$(libdl-routines))) elide-routines.os := $(routines) +routines += libc_dlerror_result extra-libs-others := libdl |