public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/11781] New: Interoperability problems between malloc hook and GCC 4.5.0 optimizations
@ 2010-07-01 16:49 opensource3141 at gmail dot com
0 siblings, 0 replies; only message in thread
From: opensource3141 at gmail dot com @ 2010-07-01 16:49 UTC (permalink / raw)
To: glibc-bugs
With the improved optimizations of GCC 4.5.0 it is possible to have code that
manipulates __malloc_hook before and after a call to malloc get optimized out.
This is because GCC is assuming that malloc is a builtin function that does not
access global variables, while GLIBC malloc does in fact rely on the global
variable __malloc_hook.
A detailed exposition of this is found in the GCC bugzilla:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44736
I am filing this bug in the GLIBC bugzilla as per a request from the GCC
developer. A GCC developer suggested marking the __malloc_hook (and associated
other hooks) as volatile in the GLIBC header file; however, this may or may not
be the right thing to do.
--
Summary: Interoperability problems between malloc hook and GCC
4.5.0 optimizations
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: opensource3141 at gmail dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=11781
------- 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] only message in thread
only message in thread, other threads:[~2010-07-01 16:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-01 16:49 [Bug libc/11781] New: Interoperability problems between malloc hook and GCC 4.5.0 optimizations opensource3141 at gmail 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).