Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Boris Schaeling" To: "Chris January" , "Cygwin AT Cygwin DOT Com" Subject: RE: Bug in g++: Testcase exits with segmentation fault Date: Tue, 14 Jan 2003 18:46:46 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 In-Reply-To: Importance: Normal > -----Original Message----- > From: cygwin-return-64848-boriss=web DOT de AT cygwin DOT com > [mailto:cygwin-return-64848-boriss=web DOT de AT cygwin DOT com]On Behalf Of Chris > January > Sent: Tuesday, January 14, 2003 6:01 PM > To: Boris Schaeling > Cc: Cygwin AT Cygwin DOT 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/