[Fwd: FW: pthread_create problem in Cygwin 1.1.8-2]

Earnie Boyd earnie_boyd@yahoo.com
Sun Apr 8 06:55:00 GMT 2001


-------- Original Message --------
Subject: FW: pthread_create problem in Cygwin 1.1.8-2
Date: Sun, 8 Apr 2001 15:40:43 +0200
From: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
To: "'earnie_boyd@yahoo.com'" <earnie_boyd@yahoo.com>

Hi Earnie,

I just received notice from the cygwin mailing list that the smtp server
of
my provider made it to the ORBS list so I send to reply to you directly.
If
you could send my reply by any chanche to the list I would be gratefull
because it is a showstopping bug that I cannot resolve.

I am using: 

Reading specs from /bin/../lib/gcc-lib/i686-pc-cygwin/2.95.3-2/specs
gcc version 2.95.3-2 (cygwin special)

Additional testing showes that if I insert a Sleep(500) in the
threadFunction() just before the return 0 it only crahes 3-5 times of
the 10
runs. Also, it crashes more often after fast repeated runs of the
program.
It also crashes more often on faster hardware (I have tested on two
machines, PII 400 and a PIII 700, both 256 MB RAM). Running only 1
thread
instead of two does not crash the program.

If I run it through GDB it shows that the crash occurs after the "return
0"
but before the closing bracket of the for loop (see the mixed output of
the
debugger source window below, the offending line is marked by me with a
"+"). It gives a SIGSEGV for both threads.



Joost

	10	      {
	11	         printf("%lu\n",i);
-	0x4010ac	<threadFunction(void *)+96>:		add
$0xfffffff8,%esp
-	0x4010af	<threadFunction(void *)+99>:		mov
0xffffffdc(%ebp),%eax
-	0x4010b2	<threadFunction(void *)+102>:		push   %eax
-	0x4010b3	<threadFunction(void *)+103>:		push
$0x401044
-	0x4010b8	<threadFunction(void *)+108>:		call
0x404cc8 <printf>
-	0x4010bd	<threadFunction(void *)+113>:		add
$0x10,%esp
	12	      }
-	0x4010c0	<threadFunction(void *)+116>:		incl
0xffffffdc(%ebp)
-	0x4010c3	<threadFunction(void *)+119>:		jmp
0x4010a4 <threadFunction__FPv+88>
-	0x4010c5	<threadFunction(void *)+121>:		lea
0x0(%esi),%esi
	13	//      Sleep(500);
	14	      return 0;
-	0x4010c8	<threadFunction(void *)+124>:		mov
0xffffff9c(%ebp),%eax
-	0x4010cb	<threadFunction(void *)+127>:		add
$0x4,%eax
-	0x4010ce	<threadFunction(void *)+130>:		mov
(%eax),%edx
+	0x4010d0	<threadFunction(void *)+132>:		mov
(%edx),%ecx
-	0x4010d2	<threadFunction(void *)+134>:		mov
%ecx,(%eax)
-	0x4010d4	<threadFunction(void *)+136>:		xor
%eax,%eax
-	0x4010d6	<threadFunction(void *)+138>:		jmp
0x4011bc <threadFunction__FPv+368>
-	0x4010db	<threadFunction(void *)+143>:		mov
0xffffff9c(%ebp),%eax
-	0x4010de	<threadFunction(void *)+146>:		add
$0x4,%eax
-	0x4010e1	<threadFunction(void *)+149>:		mov
(%eax),%edx
-	0x4010e3	<threadFunction(void *)+151>:		mov
(%edx),%ecx
-	0x4010e5	<threadFunction(void *)+153>:		mov
%ecx,(%eax)
	15	   }
	16	   catch(...)

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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



More information about the Cygwin mailing list