summaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@redhat.com>2019-04-08 17:35:05 -0400
committerCarlos O'Donell <carlos@redhat.com>2019-04-09 10:56:51 -0400
commite621246ec6393ea08ae50310f9d5e72500f8c9bc (patch)
treee187de740537af6d7784784efc71a0936d5bfe7b /ChangeLog
parent648279f4af423c4783ec1dfa63cb7b46a7640217 (diff)
downloadglibc-e621246ec6393ea08ae50310f9d5e72500f8c9bc.tar.gz
malloc: Set and reset all hooks for tracing (Bug 16573)
If an error occurs during the tracing operation, particularly during a call to lock_and_info() which calls _dl_addr, we may end up calling back into the malloc-subsystem and relock the loader lock and deadlock. For all intents and purposes the call to _dl_addr can call any of the malloc family API functions and so we should disable all tracing before calling such loader functions. This is similar to the strategy that the new malloc tracer takes when calling the real malloc, namely that all tracing ceases at the boundary to the real function and any faults at that point are the purvue of the library (though the new tracer does this on a per-thread basis in an MT-safe fashion). Since the new tracer and the hook deprecation are not yet complete we must fix these issues where we can. Tested on x86_64 with no regressions. Co-authored-by: Kwok Cheung Yeung <kcy@codesourcery.com> Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog15
1 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 503eb25ce4..2fc9814e74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2019-04-09 Carlos O'Donell <carlos@redhat.com>
+ Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ [BZ #16573]
+ * malloc/mtrace.c: Define prototypes for all hooks.
+ (set_default_hooks): New function.
+ (set_trace_hooks): Likewise.
+ (save_default_hooks): Likewise.
+ (tr_freehook): Use new s*_hooks functions.
+ (tr_mallochook): Likewise.
+ (tr_reallochook): Likewise.
+ (tr_memalignhook): Likewise.
+ (mtrace): Likewise.
+ (muntrace): Likewise.
+
2019-04-09 Wilco Dijkstra <wdijkstr@arm.com>
* benchtests/bench-stpcpy.c (SIMPLE_STPCPY): Remove function.