This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Throwing exception in constructor causes segfault


On Sat, Feb 23, 2002 at 09:56:48PM +0100, Andreas Schwab wrote:
> The problem is that operator delete[]() is receiving a different address
> than returned by operator new[]().  It looks like it is not adjusted for
> the cookie.

I don't understand the gcc exception handling code, so
can you explain this in more detail?   What is a cookie
in this case?

Also, in my testcase, if you comment out the delete[] p; line,
the testcase will still segfault.  Looks like delete[] is
called in the stack unwind code for some reason, if you
don't call it yourself.
-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@attbi.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]