Re: A malloc error in C++
Re: A malloc error in C++
- Subject: Re: A malloc error in C++
- From: Giacomo Monari <email@hidden>
- Date: Wed, 29 Aug 2007 18:02:52 +0200
Lyndsey Ferguson ha scritto:
Try this:
1. Turn off "Start executable after starting debugger" in the executable (in
your Xcode project -- see attached image).
2. Click debug, the debugger will load your app.
3. Type "b szone_error".
4. Type "run"
5. When your application runs, it should break when memory is about to be
corrupted. Look at the stack crawl. This should lead you to a solution.
Good luck,
Lyndsey
Well, I don't know if I correctly understood... But I tried to do:
1. Was already turned off.
2. Done
3. I typed it in the console.
4. I typed run in the console.
At this point the debugger points the line:
*__first = __tmp;
From the definition of
std::fill_n (wich I used in my program) in stl_algobase.h :
template<>
struct __fill_n<true>
{
template<typename _OutputIterator, typename _Size, typename
_Tp>
static _OutputIterator
fill_n(_OutputIterator __first, _Size __n, const _Tp&
__value)
{
const _Tp __tmp = __value;
for (; __n > 0; --__n, ++__first)
*__first = __tmp;
return __first;
}
};
Giacomo
----
Email.it, the professional e-mail, gratis per te:clicca qui
Sponsor:
Collezioni Moda Giro dÂ’Italia Fashion. Approfitta dei saldi estivi. Sconti dal 30 al 50%. Uomo, Donna e Bambino. Prodotto ufficiale.
Clicca qui
|
_______________________________________________
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