This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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 Licenciado en Sistemas
Attachment:
pthread_create_problem.tar.gz
Description: GNU Zip compressed data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |