Re: Crash in virtual method call
Re: Crash in virtual method call
- Subject: Re: Crash in virtual method call
- From: Jens Alfke <email@hidden>
- Date: Wed, 11 Jun 2008 21:14:46 -0700
On 11 Jun '08, at 2:55 PM, Doug Hill wrote:
The method crashes because an input parameter passed to it comes in
as a bad pointer. Its pointer value is 4 less than the actual passed
in value.
Does your real code use multiple inheritance? You can run into trouble
like this with MI, where the 'this' pointer will be offset by the
runtime to point to where a secondary base class's instance data
begins. Doing type-casting of object pointers in the wrong way can
interfere with this and get the wrong offsets applied.
(If this is the case, I can't offer more detailed advice, as I've
always tried to stay as far away as possible from MI in C++ for just
these sorts of reasons...)
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden