summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-08-06 00:23:40 +0000
committermarcel <marcel@FreeBSD.org>2003-08-06 00:23:40 +0000
commit5dfa7ee632d0c80c07c607c80c1c64c54e21d713 (patch)
treee5facacee24f0e641fdf47521aa7252fc32cb6db /lib
parente45924adacc537bd33ecd167bd88c4ab9ace9097 (diff)
downloadFreeBSD-src-5dfa7ee632d0c80c07c607c80c1c64c54e21d713.zip
FreeBSD-src-5dfa7ee632d0c80c07c607c80c1c64c54e21d713.tar.gz
Fix an off by one error in the number of arguments passed to
makecontext(). We only supply 3, not 4. This is mostly harmless, except that on ia64 the garbage can include NaT bits, resulting in NaT consumption faults.
Diffstat (limited to 'lib')
-rw-r--r--lib/libkse/thread/thr_create.c2
-rw-r--r--lib/libpthread/thread/thr_create.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libkse/thread/thr_create.c b/lib/libkse/thread/thr_create.c
index fcc4ac5..c73a3da 100644
--- a/lib/libkse/thread/thr_create.c
+++ b/lib/libkse/thread/thr_create.c
@@ -193,7 +193,7 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr,
new_thread->tcb->tcb_tmbx.tm_context.uc_stack.ss_sp =
new_thread->attr.stackaddr_attr;
makecontext(&new_thread->tcb->tcb_tmbx.tm_context,
- (void (*)(void))thread_start, 4, new_thread,
+ (void (*)(void))thread_start, 3, new_thread,
start_routine, arg);
/*
* Check if this thread is to inherit the scheduling
diff --git a/lib/libpthread/thread/thr_create.c b/lib/libpthread/thread/thr_create.c
index fcc4ac5..c73a3da 100644
--- a/lib/libpthread/thread/thr_create.c
+++ b/lib/libpthread/thread/thr_create.c
@@ -193,7 +193,7 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr,
new_thread->tcb->tcb_tmbx.tm_context.uc_stack.ss_sp =
new_thread->attr.stackaddr_attr;
makecontext(&new_thread->tcb->tcb_tmbx.tm_context,
- (void (*)(void))thread_start, 4, new_thread,
+ (void (*)(void))thread_start, 3, new_thread,
start_routine, arg);
/*
* Check if this thread is to inherit the scheduling
OpenPOWER on IntegriCloud