This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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

-------- 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 <>
To: "''" <>

Hi Earnie,

I just received notice from the cygwin mailing list that the smtp server
my provider made it to the ORBS list so I send to reply to you directly.
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
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
instead of two does not crash the program.

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


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

Do You Yahoo!?
Get your free address at

Want to unsubscribe from this list?
Check out:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]