delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/01/13/19:48:37

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
X-Authentication-Warning: hp2.xraylith.wisc.edu: khan owned process doing -bs
Date: Thu, 13 Jan 2000 18:51:25 -0600 (CST)
From: Mumit Khan <khan AT NanoTech DOT Wisc DOT EDU>
To: Joost Kraaijeveld <JKraaijeveld AT Askesis DOT nl>
cc: "Cygwin AT Sourceware. Cygnus. Com (E-mail)" <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: Mingw32 / GCC 2.95.2 bug?
In-Reply-To: <1F8B49DD9100D31195FC00A0C94989FE0DB8@obelix>
Message-ID: <Pine.HPP.3.96.1000113184515.12809C-100000@hp2.xraylith.wisc.edu>
MIME-Version: 1.0

On Thu, 13 Jan 2000, Joost Kraaijeveld wrote:

> I have this little program that does not work on MingW32 with the CRT or
> MSVC runtime. It works on two other compiler (IBM Visual Age and
> Microsoft VC 6.0).
> 
> I think that it is the fault of the compiler. Can anyone look onto this?
> 
> One can download the example at http://www.askesis.nl , follow the link
> bugs???.
> 
> To install the example: create a directory, unzip the file, type make.
> To run it without error: type "ALibTest 1 0", to run it with error: type
> "ALibTest 1 1". This is the simplest case. The are more complex examples
> depending on the parameters (one can figure that out in Main.cpp). For
> the IBM and MS environment, project files are included.
> 

You missed -mthreads when linking (which is crucial as I had pointed out
to you via email). Please try and then see if it still crashes. After 
adding -mthreads to LFLAGS, I don't see a crash for either `1 0' or `1 1' 
on the command line.  To use C++ EH and memory allocation in a thread
safe manner, you must both compile and link with -mthreads option. When
you compile, it defines _MT, and STL uses that to allocate with locks;
when you link, it links in a special DLL that does the per-thread cleanup
of exception objects.

btw, you should really move this to the Mingw list, since it really has 
nothing to do with Cygwin, but rather an issue with how Mingw supports
thread-safe C++ runtime, especially C++ EH (Cygwin does not yet support
thread-safe C++ runtime, but it'll happen in the near future once I find
some free time).

Regards,
Mumit



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019