From 39edba076eebd5effcca91a2bb5545e5908b3445 Mon Sep 17 00:00:00 2001 From: Daniel Eischen Date: Thu, 22 Jan 2004 19:15:08 +0000 Subject: Initialize the (i386) frame pointer when setting up a thread context. Submitted by: Marc Olzheim Tested by: Marc Olzheim --- lib/libc_r/uthread/pthread_private.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libc_r/uthread/pthread_private.h b/lib/libc_r/uthread/pthread_private.h index 6807f2f59b5a3..f83e2f4b26175 100644 --- a/lib/libc_r/uthread/pthread_private.h +++ b/lib/libc_r/uthread/pthread_private.h @@ -86,7 +86,10 @@ fdata = (char *) (ucp)->uc_mcontext.mc_fpstate; \ __asm__("frstor %0": :"m"(*fdata)); \ } while (0) -#define SET_RETURN_ADDR_JB(jb, ra) (jb)[0]._jb[0] = (int)(ra) +#define SET_RETURN_ADDR_JB(jb, ra) do { \ + (jb)[0]._jb[0] = (int)(ra); \ + (jb)[0]._jb[3] = 0; \ +} while (0) #elif defined(__amd64__) #define GET_STACK_JB(jb) ((unsigned long)((jb)[0]._jb[2])) #define GET_STACK_SJB(sjb) ((unsigned long)((sjb)[0]._sjb[2])) -- cgit v1.3