logo       

Re: Strange backtrace: msg#00406

kde-devel

Subject: Re: Strange backtrace

On 30.07.09 19:26:41, John Tapsell wrote:
> > However, there's just no way that the pointer can change from 0x82097e8 to
> > 0xbfb99b78. The former pointer is an address in the heap, while the latter
> > is on the stack.
>
> 1) How can you tell?
> 2) How can I learn such things?
>
> I am in constant awe of people that know these things. Please, show
> me the path to also become a demi-god.

I'm no expert on these things, so take this with a grain of salt:

In this case its relatively obvious (to me), because both pointers are
rather far away. A changing this pointer due to calling into a (virtual)
base class wouldn't change the this pointer that much, it would still be
somewhere around the original value of 0x82097e8. The this pointer AFAIK
only changes by the amount of the class-sizes that are "missing", i.e.
depends on the size of the members of the class mostly. So if you cast
up the inheritance hierarchy you might get a memory address thats a bit
lower, but not on the other end of your allocatable area :)

I wouldn't have known that 0xbf indicates the stack though :)

--
Be cheerful while you are alive.
-- Phathotep, 24th Century B.C.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Google Custom Search

News | Mail Home | sitemap | FAQ | advertise