X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=0.0 required=5.0 	tests=BAYES_50,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <20090722203715.rejtt46nhccswo4g@webmail.mit.edu>
Date: Wed, 22 Jul 2009 20:37:15 -0400
From: Joshua John Bialkowski <jbialk@MIT.EDU>
To: Greg Chicares <gchicares@sbcglobal.net>
Cc: cygwin@cygwin.com
Subject: Re: (g++) program crashes when I throw an exception in a separate  	 thread
References: <20090722200521.zftez7gasggsk0gw@webmail.mit.edu> 	<4A67AD3A.8060800@sbcglobal.net>
In-Reply-To: <4A67AD3A.8060800@sbcglobal.net>
MIME-Version: 1.0
Content-Type: text/plain; 	charset=ISO-8859-1; 	format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: Internet Messaging Program (IMP) H3 (4.0.3)
X-Spam-Score: -2.599
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

>> I'm using g++ (GCC) version 3.4.4 from the cygwin installer, and 
>> I've run in to
>> this very confusing problem. I'm compiling with the -mno-cygwin option
> [...]
>> The problem I have is that when I launch a separate thread, and then 
>> throw an
>> exception in that separate thread, my program will crash... even if I catch
>> that exception.
>
> Are you compiling with '-mthreads'?
>

I was not, in fact. Of course the first results in Google for "MinGW
'-mthreads'" is: "always use -mthreads when using threads under MinGW. I just
spent hours using gdb instead of -mthreads." I will give that a try and report
back to the list for the benefit of posterity.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

