sysdep/i386/backtrace.h infinite loop?
Marco Trudel
mtrudel@gmx.ch
Wed Feb 21 12:11:00 GMT 2007
Andrew Haley wrote:
> Marco Trudel writes:
> > Andrew Haley wrote:
> > > Marco Trudel writes:
> > > > Maybe a stupid question, but how can this loop in
> > > > sysdep/i386/backtrace.h ever end:
> > > >
> > > > register _Jv_uintptr_t *_ebp __asm__ ("ebp");
> > > > _Jv_uintptr_t rfp;
> > > > for (rfp = *_ebp; rfp; rfp = *(_Jv_uintptr_t *)rfp)
> > > > {
> > > > // only read access for rfp
> > > > }
> > > >
> > > > Maybe because "*(_Jv_uintptr_t *)rfp" is changing it, but I can't see how...
> > >
> > > It looks to me like it's walking down a linked list until it hits NULL.
> >
> > Yeah, but where happens the down-walking? In my opinion we do
> > always-the-same-value-walking...
>> What, in your opinion, does
>> rfp = *(_Jv_uintptr_t *)rfp;
>> do?
Nothing. But as I said already this is probably doing something. But I
can't see what. On second thought, what about: Setting rfp to the value
stored at the location which was addressed by the value of the old rfp?
Ok, I see. Something is being done and I should work on my C knowledge
if I don't understand it. Will do :-)
thanks
Marco
More information about the Java
mailing list