Hi. I'm having problems trying to create a thread with a user supplied stack in a shared object. I get a "segmentation fault". The error does not happen if there are no shared objects involved. The detail is: - I have a "d.cpp" source with a main() that calls my_pthread_create in a shared object "c.so" - my_pthread_create in "c.cpp": - I malloc 1MB + a page size bytes - set the pointer to the pthread_attr_t object with pthread_set_stack( ptr, 1MB ) - call pthread_create - crash! The question is: what is the problem? Am I doing something wrong? In the attachement I send the sources and a readme with the output of gcc -v, uname -a and a stack trace of the failure. Thanks. ------------------------------------------------------------ Juan Carlos Franzoy Analista Programador Tel: +54-11-4780-2634 mailto:JCFranzoy@xxxxxxxxxx http://www.ats.com.ar ------------------------------------------------------------ ____________________________________________________________________________________ ¡Sé un mejor ambientalista! Encontrá consejos para cuidar el lugar donde vivimos en http://ar.yahoo.com/promos/mejorambientalista.html
Attachment:
pthread_create_problem.tar.gz
Description: Unix tar archive