This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tracing malloc/free call


On Jan 16 16:44, Corinna Vinschen wrote:
> Hi Marco,
> 
> On Jan 16 15:23, Marco Atzeri wrote:
> > On 1/15/2015 10:34 AM, Corinna Vinschen wrote:
> > >Bottom line, you should be able to fetch the original return address by
> > >printing the value at
> > >
> > >   *(void*)_my_tls->stackptr
> > >
> > >which points to the uppermost entry on the stack.
> > 
> > Hi Corinna,
> > 
> > in reality I found it is "*(_my_tls.stackptr-1)"
> 
> Oh, right!  Sorry about that.  I missed to take the behavior of xadd
> into account.

Worse, I missed the fact that _my_tls.retaddr() already provides the
correct return address.  Sorry again.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpNifNgziBzO.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]