Re: pthread_create leaves valid mutex pointers on the stack

2006-03-22 Thread Corinna Vinschen
On Mar 16 18:11, Samuel Thibault wrote: > Hi, > > Jonathan Lennox, le Thu 16 Mar 2006 12:03:03 -0500, a écrit : > Content-Description: message body text > > In general, the idea of verifying objects on their init functions seems > > dubious to me -- how can you tell initialized objects from random

Re: pthread_create leaves valid mutex pointers on the stack

2006-03-16 Thread Samuel Thibault
Hi, Jonathan Lennox, le Thu 16 Mar 2006 12:03:03 -0500, a écrit : Content-Description: message body text > In general, the idea of verifying objects on their init functions seems > dubious to me -- how can you tell initialized objects from random stack or > heap garbage? Posix says: Attemptin

pthread_create leaves valid mutex pointers on the stack

2006-03-16 Thread Jonathan Lennox
Cygwin's pthread_create function leaves a pointer to the pthread object's mutex member on the stack. If you subsequently call pthread_mutex_init on mutex in an automatic variable, it's possible for it to reuse this stack slot. In this case, pthread_mutex_init observes that the mutex object is a p