pthread_support.c (GC_get_thread_stack_base): Handle pthread_getattr_np failures.
* pthread_support.c (GC_get_thread_stack_base): Handle pthread_getattr_np failures. From-SVN: r125957
This commit is contained in:
parent
5e33addbb6
commit
0c51836d01
2 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-06-22 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* pthread_support.c (GC_get_thread_stack_base): Handle
|
||||||
|
pthread_getattr_np failures.
|
||||||
|
|
||||||
2007-06-02 Paolo Bonzini <bonzini@gnu.org>
|
2007-06-02 Paolo Bonzini <bonzini@gnu.org>
|
||||||
|
|
||||||
* configure: Regenerate.
|
* configure: Regenerate.
|
||||||
|
|
|
@ -1135,7 +1135,13 @@ GC_PTR GC_get_thread_stack_base()
|
||||||
size_t stack_size;
|
size_t stack_size;
|
||||||
|
|
||||||
my_pthread = pthread_self();
|
my_pthread = pthread_self();
|
||||||
pthread_getattr_np (my_pthread, &attr);
|
if (pthread_getattr_np (my_pthread, &attr) != 0)
|
||||||
|
{
|
||||||
|
# ifdef DEBUG_THREADS
|
||||||
|
GC_printf1("Can not determine stack base for attached thread");
|
||||||
|
# endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
pthread_attr_getstack (&attr, (void **) &stack_addr, &stack_size);
|
pthread_attr_getstack (&attr, (void **) &stack_addr, &stack_size);
|
||||||
pthread_attr_destroy (&attr);
|
pthread_attr_destroy (&attr);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue