delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/08/21:54:23

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
Date: Sun, 8 Apr 2001 21:53:56 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: G++ guru's please comment - Re: FW: pthread_create problem in Cygwin 1.1.8-2]
Message-ID: <20010408215355.A24802@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <EA18B9FA0FE4194AA2B4CDB91F73C0EF08EEC8 AT itdomain002 DOT itdomain DOT net DOT au>
Mime-Version: 1.0
User-Agent: Mutt/1.3.11i
In-Reply-To: <EA18B9FA0FE4194AA2B4CDB91F73C0EF08EEC8@itdomain002.itdomain.net.au>; from robert.collins@itdomain.com.au on Mon, Apr 09, 2001 at 11:31:57AM +1000

On Mon, Apr 09, 2001 at 11:31:57AM +1000, Robert Collins wrote:
>> -----Original Message-----
>> From: Robert Collins 
>> Sent: Monday, April 09, 2001 11:14 AM
>> To: cygwin AT cygwin DOT com
>> Subject: RE: G++ guru's please comment - Re: FW: 
>> pthread_create problem
>> in Cygwin 1.1.8-2]
>> 
>> 
>> 
>> I will, once I have a good binary to compare with. I don't know what
>> return 0; in a try{} should look like.
>> 
>> Just for fun I removed the printf, and the crash went away. It also
>> never appears with only one thread running.
>> 
>> I've had a quick read of the asembly and will report back.
>> 
>
>
>I haven't got time for an exhaustive session on this during the workday.
>I'll look at it more at home tonight.
>
>It's definately not printf() trashing ecx - I have a slightly more
>trivial test case below. I'd really appreciate a non-stripped working
>binary of the test case below so I can track this down a little more
>quickly. BTW Chris - esp looks fine to me, it's just ecx that's getting
>trashed. 

I wouldn't expect the stack pointer to be screwed up.  I'd expect that
the *stack* is screwed up.  I don't believe that the ecx register should
be preserved across function calls so I don't know why this would mater.

>If someone tries to build this, you will need a snapshot to have the
>sched_yield() function. The bug isn't in the pthread code AFAICT - Joost
>is on 1.1.8, and I'm on my new code, and we both have the same symptoms.
>
>>From what I can see so far the exception is related to the thread
>exiting within the try {} block after the thread function has lost the
>processor to another instance of the same function. sched_yield() simply
>forces that to occur.
>
>(going out on a limb) This may be something solvable by building gcc
>with pthread exception handling as Mumit suggested. 

Yep.  Probably.  Somebody should try that.

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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