delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | Lewis Hyatt <lhyatt AT princeton DOT edu> |
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: | <fe3t7j$ik1$1@sea.gmane.org> |
References: | <DDD65EF5-1C72-4986-9B85-CE867B0AAE4F AT jessies DOT org> <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 |
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 |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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 <stdexcept> > 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |