Explicitly initialize ucontext before calling getmcontext.
This commit is contained in:
parent
a9bb5cb76e
commit
13011308e4
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: irix_signal.c,v 1.55 2011/01/14 02:06:33 rmind Exp $ */
|
||||
/* $NetBSD: irix_signal.c,v 1.56 2011/02/03 21:45:31 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994, 2001-2002 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: irix_signal.c,v 1.55 2011/01/14 02:06:33 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: irix_signal.c,v 1.56 2011/02/03 21:45:31 joerg Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/signal.h>
|
||||
|
@ -707,6 +707,8 @@ irix_sys_getcontext(struct lwp *l, const struct irix_sys_getcontext_args *uap, r
|
|||
|
||||
f = (struct frame *)l->l_md.md_regs;
|
||||
|
||||
memset(&kucp, 0, sizeof(kucp));
|
||||
|
||||
kucp.iuc_flags = IRIX_UC_ALL;
|
||||
kucp.iuc_link = NULL; /* XXX */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_signal.c,v 1.34 2010/04/23 15:19:20 rmind Exp $ */
|
||||
/* $NetBSD: netbsd32_signal.c,v 1.35 2011/02/03 21:45:31 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Matthew R. Green
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.34 2010/04/23 15:19:20 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.35 2011/02/03 21:45:31 joerg Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -361,6 +361,8 @@ netbsd32_getcontext(struct lwp *l, const struct netbsd32_getcontext_args *uap, r
|
|||
struct proc *p = l->l_proc;
|
||||
ucontext32_t uc;
|
||||
|
||||
memset(&uc, 0, sizeof(uc));
|
||||
|
||||
mutex_enter(p->p_lock);
|
||||
getucontext32(l, &uc);
|
||||
mutex_exit(p->p_lock);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_signal.c,v 1.64 2008/04/28 20:23:45 martin Exp $ */
|
||||
/* $NetBSD: svr4_signal.c,v 1.65 2011/02/03 21:45:31 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_signal.c,v 1.64 2008/04/28 20:23:45 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_signal.c,v 1.65 2011/02/03 21:45:31 joerg Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -462,6 +462,8 @@ svr4_sys_context(struct lwp *l, const struct svr4_sys_context_args *uap, registe
|
|||
svr4_ucontext_t uc;
|
||||
*retval = 0;
|
||||
|
||||
memset(&uc, 0, sizeof(uc));
|
||||
|
||||
switch (SCARG(uap, func)) {
|
||||
case SVR4_GETCONTEXT:
|
||||
DPRINTF(("getcontext(%p)\n", SCARG(uap, uc)));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sys_sig.c,v 1.30 2011/01/10 04:39:18 christos Exp $ */
|
||||
/* $NetBSD: sys_sig.c,v 1.31 2011/02/03 21:45:32 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
|
@ -66,7 +66,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.30 2011/01/10 04:39:18 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.31 2011/02/03 21:45:32 joerg Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -317,6 +317,8 @@ sys_getcontext(struct lwp *l, const struct sys_getcontext_args *uap,
|
|||
struct proc *p = l->l_proc;
|
||||
ucontext_t uc;
|
||||
|
||||
memset(&uc, 0, sizeof(uc));
|
||||
|
||||
mutex_enter(p->p_lock);
|
||||
getucontext(l, &uc);
|
||||
mutex_exit(p->p_lock);
|
||||
|
|
Loading…
Reference in New Issue