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 Date: Sun, 8 Apr 2001 21:53:56 -0400 From: Christopher Faylor 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: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.11i In-Reply-To: ; 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