Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Subject: Re: What flags should I use, -mthread, -mthreads, -lmmalloc, .... ? From: Robert Collins To: jgkarman Cc: cygwin AT cygwin DOT com In-Reply-To: <20010911.7553700@linux.local> References: <20010911 DOT 7553700 AT linux DOT local> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/0.13 (Preview Release) Date: 12 Sep 2001 00:14:26 +1000 Message-Id: <1000217667.7293.265.camel@lifelesswks> Mime-Version: 1.0 X-OriginalArrivalTime: 11 Sep 2001 14:01:17.0591 (UTC) FILETIME=[3A1DA270:01C13ACA] On Tue, 2001-09-11 at 17:55, jgkarman wrote: > Hello, > > I'm trying to port a program to Windows95, using cygwin 1.3.2. It > consists of a GUI displaying data that are calculated by a background > process, and uses templates in a multithreaded environment. It keeps > crashing with a segfault when allocating memory for a template, either > my own or standard templates like std::vector. BTW, the same program > runs flawlessly for more than a week under linux. 1.3.2. is broken for threading :-[. grab a developers snapshot for now, 1.3.3 will be out RSN. > I looked in the users manual, but found no information for either > mmaloc or -mthread(s), nor did I find any other hints for using > templates in a multithreaded program. > > Can anyone tell me what more I could try, or better yet: what the > magical flags are to make everything work? Have a read of the list archives, there was a problem some time ago with C++ exception handling due to the gcc compiler not being built with a thread model. I'm not sure if that has been put into production or not at this point. You can also build a debug cygwin .dll and try to get a backtrace of the crash. If you can pin down the function responsible things may become clearer as to the problem. Once you've moved beyond 1.3.2 things may just magically work though so that should be your first step. Rob -- 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/