delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/11/13:33:02

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: jgkarman <ffc AT hetnet DOT nl>
Date: Tue, 11 Sep 2001 18:30:26 GMT
Message-ID: <20010911.18302600@linux.local>
Subject: Re: What flags should I use, -mthread, -mthreads, -lmmalloc, .... ?
To: Robert Collins <robert DOT collins AT itdomain DOT com DOT au>
CC: cygwin AT cygwin DOT com
In-Reply-To: <1000217667.7293.265.camel@lifelesswks>
References: <20010911 DOT 7553700 AT linux DOT local> <1000217667 DOT 7293 DOT 265 DOT camel AT lifelesswks>
X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.1; Linux)
X-Priority: 3 (Normal)
MIME-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id NAA22933

Thanks for your reply, very much appreciated.

I renamed the cygwin1.dll, and put the snapshot of 11-9 in its place 
(I understood that was what you recommended me to do, just the 
cygwin1.dll). Unfortunately things haven't improved, I still get a 
segmentation fault. This time it's in std::vector. I've seen this in 
the past, but it probably could have happened somewhere else as well. 
Here is the message I get from gdb:

----------------------
Program received signal SIGSEGV, Segmentation fault.
0x004e402e in vector<double, allocator<double> >::vector (this=0xcaf75c, 
__x=@0xcaf6ec)
    at /usr/include/g++-3/stl_vector.h:234
Current language:  auto; currently c++                                 
                                
----------------------

This is called directly from my own code. Could I get more relevant 
information by debugging the cygwin dll? I once tried to come up with 
a test program that would produce the same error, but since I use 
-mthreads it doesn't seem to crash anymore. Looks like I haven't 
caught the essential code bit yet, but I could try again. 

Any hints are welcome.

Regards,
Geert


>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 11/09/01, 15:14:26, Robert Collins <robert DOT collins AT itdomain DOT com DOT au> 
wrote regarding Re: What flags should I use, -mthread, -mthreads, 
-lmmalloc, .... ?:


> 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/

- Raw text -


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