This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug malloc/16573] mtrace hangs when MALLOC_TRACE is defined
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 09 Apr 2019 14:57:54 +0000
- Subject: [Bug malloc/16573] mtrace hangs when MALLOC_TRACE is defined
- Auto-submitted: auto-generated
- References: <bug-16573-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16573
--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via e621246ec6393ea08ae50310f9d5e72500f8c9bc (commit)
from 648279f4af423c4783ec1dfa63cb7b46a7640217 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e621246ec6393ea08ae50310f9d5e72500f8c9bc
commit e621246ec6393ea08ae50310f9d5e72500f8c9bc
Author: Carlos O'Donell <carlos@redhat.com>
Date: Mon Apr 8 17:35:05 2019 -0400
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>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 15 +++++++++++
malloc/mtrace.c | 72 +++++++++++++++++++++++++++++++++++--------------------
2 files changed, 61 insertions(+), 26 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.