logo       

Re: Strange backtrace: msg#00348

kde-devel

Subject: Re: Strange backtrace

Stefan Majewsky wrote:
>As you see, the second-to-last line in the method invokes
>Kolf::Game::setCurrentHole, which equals the step from #8 to #7 in above
>backtrace. The fact that puzzles me is that the this pointer changes
> between #8 and #7. How can I interpret this? In my understanding the
> this pointer stays the same even during casts (if we disregard multiple
> inheritance which is not used in this class layout). Is this wrong?

The this pointer doesn't stay the same in the case of multiple inheritance
if you're casting the pointer to a base which is not the primary base
(non-virtual).

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.

Unless this is just an artifice of optimisation, which I'm sure you'd have
caught by now by compiling with -O0, this has to be a bug caused by
uninitialised memory access somewhere.

Of course, since the source code I have has no NormalGame or Game classes,
I have no clue what memory could be uninitialised. In fact, I have no clue
whether there is multiple inheritance at play.

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358

Attachment: signature.asc
Description: This is a digitally signed message part.


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

News | Mail Home | sitemap | FAQ | advertise