X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Lewis Hyatt Subject: Re: 1.5.24-2: zero-length write() and ioctl() on fd -1 cause crashes Date: Thu, 04 Oct 2007 19:33:11 -0400 Lines: 20 Message-ID: References: <20070919090938 DOT GA4380 AT calimero DOT vinschen DOT de> <33227 DOT 63 DOT 110 DOT 244 DOT 98 DOT 1191537510 DOT squirrel AT webmail DOT jessies DOT org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) In-Reply-To: <33227.63.110.244.98.1191537510.squirrel@webmail.jessies.org> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 > $ cat ex.cpp > #include > int main() { > try { > throw new std::exception(); > } catch (const std::exception& ex) { > return 1; > } > return 0; > } You are throwing a pointer and trying to catch a reference, so the exception never gets caught at all, which causes the program to abort. You should should do throw std::exception(); instead. -Lewis -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/