about summary refs log tree commit diff
path: root/ChangeLog
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2019-05-15 17:14:01 +0200
committerMark Wielaard <mark@klomp.org>2019-05-15 23:34:55 +0200
commit11b451c8868d8a2b0edc5dfd44fc58d9ee538be0 (patch)
tree54af71dd79004a0769dd70c9ab332c73b49a9ae3 /ChangeLog
parent5dde9ef79a62b305f054ae9594a32e687dafbea6 (diff)
downloadglibc-11b451c8868d8a2b0edc5dfd44fc58d9ee538be0.tar.gz
glibc-11b451c8868d8a2b0edc5dfd44fc58d9ee538be0.tar.xz
glibc-11b451c8868d8a2b0edc5dfd44fc58d9ee538be0.zip
dlfcn: Guard __dlerror_main_freeres with __libc_once_get (once) [BZ# 24476]
dlerror.c (__dlerror_main_freeres) will try to free resources which only
have been initialized when init () has been called. That function is
called when resources are needed using __libc_once (once, init) where
once is a __libc_once_define (static, once) in the dlerror.c file.
Trying to free those resources if init () hasn't been called will
produce errors under valgrind memcheck. So guard the freeing of those
resources using __libc_once_get (once) and make sure we have a valid
key. Also add a similar guard to __dlerror ().

	* dlfcn/dlerror.c (__dlerror_main_freeres): Guard using
	__libc_once_get (once) and static_bug == NULL.
	(__dlerror): Check we have a valid key, set result to static_buf
	otherwise.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog8
1 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index cf6959d262..ea7b3d4f48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-05-15  Mark Wielaard  <mark@klomp.org>
+
+	[BZ# 24476]
+	* dlfcn/dlerror.c (__dlerror_main_freeres): Guard using
+	__libc_once_get (once) and static_buf == NULL.
+	(__dlerror): Check we have a valid key, set result to static_buf
+	otherwise.
+
 2019-05-15  Andreas Schwab  <schwab@suse.de>
 
 	[BZ #20568]