public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/9939] New: MCheck is not thread safe - can report false errors on multi threaded apps
@ 2009-03-11 15:08 wdtj at yahoo dot com
  2009-03-11 15:14 ` [Bug libc/9939] " drepper at redhat dot com
  0 siblings, 1 reply; 4+ messages in thread
From: wdtj at yahoo dot com @ 2009-03-11 15:08 UTC (permalink / raw)
  To: glibc-bugs

MCheck is not thread safe - can report false errors on multi threaded apps.  

mcheck.c uses the __malloc_hook (et al) feature of malloc.c & arena.c to
intercept memory requests.  During it's processing, it swaps the _hooks back to
their original values and recursively calls the memory request in order to do
the actual memory request.  While this hook is swapped out, another thread could
call the memory request and at that point get memory that bypassed mcheck.  This
memory will then be reported as corrupt if it is freed with the mcheck hook back
in place.

Possible fixes:
1) Add linkage to malloc.c's _int_malloc (el al) functions that would allow
mcheck to access the memory allocation without having to go through the code
implementing the hooks.

2) Change or add a new hook set that allows the hooker to wrapper the call, not
just intercept it.

3) Write a separate memory pool routine for use in mcheck.  (yuck).

-- 
           Summary: MCheck is not thread safe - can report false errors on
                    multi threaded apps
           Product: glibc
           Version: 2.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: wdtj at yahoo dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=9939

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/9939] MCheck is not thread safe - can report false errors on multi threaded apps
  2009-03-11 15:08 [Bug libc/9939] New: MCheck is not thread safe - can report false errors on multi threaded apps wdtj at yahoo dot com
@ 2009-03-11 15:14 ` drepper at redhat dot com
  0 siblings, 0 replies; 4+ messages in thread
From: drepper at redhat dot com @ 2009-03-11 15:14 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2009-03-11 15:14 -------
This is by design.  This can never be changed without breaking various ABIs.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


http://sourceware.org/bugzilla/show_bug.cgi?id=9939

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/9939] MCheck is not thread safe - can report false errors on multi threaded apps
       [not found] <bug-9939-131@http.sourceware.org/bugzilla/>
  2012-08-30 16:13 ` jan.kratochvil at redhat dot com
@ 2014-07-01 20:39 ` fweimer at redhat dot com
  1 sibling, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-07-01 20:39 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=9939

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/9939] MCheck is not thread safe - can report false errors on multi threaded apps
       [not found] <bug-9939-131@http.sourceware.org/bugzilla/>
@ 2012-08-30 16:13 ` jan.kratochvil at redhat dot com
  2014-07-01 20:39 ` fweimer at redhat dot com
  1 sibling, 0 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-08-30 16:13 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=9939

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan.kratochvil at redhat
                   |                            |dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-01 20:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-11 15:08 [Bug libc/9939] New: MCheck is not thread safe - can report false errors on multi threaded apps wdtj at yahoo dot com
2009-03-11 15:14 ` [Bug libc/9939] " drepper at redhat dot com
     [not found] <bug-9939-131@http.sourceware.org/bugzilla/>
2012-08-30 16:13 ` jan.kratochvil at redhat dot com
2014-07-01 20:39 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).