summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/pt-sysdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/pt-sysdep.c')
-rw-r--r--sysdeps/mach/hurd/pt-sysdep.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/pt-sysdep.c b/sysdeps/mach/hurd/pt-sysdep.c
index 09f0dcb..fd71aba 100644
--- a/sysdeps/mach/hurd/pt-sysdep.c
+++ b/sysdeps/mach/hurd/pt-sysdep.c
@@ -65,6 +65,11 @@ init_routine (void)
err = __pthread_create_internal (&thread, 0, 0, 0);
assert_perror (err);
+ /* XXX The caller copies the command line arguments and the environment
+ to the new stack. Pretend it wasn't allocated so that it remains
+ valid if the main thread terminates. */
+ thread->stack = 0;
+
___pthread_self = thread;
/* Decrease the number of threads, to take into account that the