This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin 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: Bug in g++: Testcase exits with segmentation fault



> -----Original Message-----
> From: cygwin-return-64848-boriss=web.de@cygwin.com
> [mailto:cygwin-return-64848-boriss=web.de@cygwin.com]On Behalf Of Chris
> January
> Sent: Tuesday, January 14, 2003 6:01 PM
> To: Boris Schaeling
> Cc: Cygwin@Cygwin.Com
> Subject: RE: Bug in g++: Testcase exits with segmentation fault

> [...]
> The bug is actually in your testcase.
> The line:
> 	Observers.push_back(observer());
> creates a temporary observer object. So when the line
> 	observer::observer() { Select.give(this); }
> calls give(), it leaves a dangling pointer.

Oh, you are right. I've forgotten to use a smart pointer ... thanks for your
feedback!

Boris


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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