This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][BZ #7233] Do not let tr_break call be optimized away.
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 25 Oct 2013 18:51:47 +0200
- Subject: Re: [RFC][BZ #7233] Do not let tr_break call be optimized away.
- Authentication-results: sourceware.org; auth=none
- References: <20131017180904 dot GA5296 at domone dot podge> <20131025101619 dot GJ23099 at spoyarek dot pnq dot redhat dot com>
On Fri, Oct 25, 2013 at 03:46:19PM +0530, Siddhesh Poyarekar wrote:
> On Thu, Oct 17, 2013 at 08:09:04PM +0200, OndÅej BÃlka wrote:
> > Hi,
> >
> > In following bug a gcc optimizes tr_break call in tr_freehook. Adding
> > side effect prevents that.
>
> So what is the problem with optimizing the call?
>
> Siddhesh
/* This function is called when the block being alloc'd, realloc'd, or
freed has an address matching the variable "mallwatch". In a debugger,
set "mallwatch" to the address of interest, then put a breakpoint on
tr_break. */
debugger will not stop when it is optimized away.