Re: Moderated post on self going out of scope
Re: Moderated post on self going out of scope
- Subject: Re: Moderated post on self going out of scope
- From: David Blanton <email@hidden>
- Date: Mon, 18 Jan 2010 20:50:50 -0700
So I set stack-protector-all as "other C++ flags" and got
_stack_chk_fail
So this means the C++ constructor is corupting the stack?
-db
On Jan 18, 2010, at 8:28 PM, Ken Thomases wrote:
On Jan 18, 2010, at 9:17 PM, David Blanton wrote:
In a view IBAction I instance a C++ class. As soon as the class is
instanced, self in the variables window, goes to 0x0 !
Try logging the value of self, rather than relying on the debugger
display. The debugger can sometimes be wrong.
Otherwise, make sure the constructor of your C++ class isn't
trashing memory. Sounds like writing past the bounds of a stack
variable.
If you're doing placement new, you might also be messing that up.
You could try compiling with -fstack-protector-all to try to detect
stack smashers closer to where/when they happen.
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden