Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Handle args for 32-bit emulation processes properly.
details: https://anonhg.NetBSD.org/src/rev/4fa50fbd803d
branches: trunk
changeset: 480017:4fa50fbd803d
user: eeh <eeh%NetBSD.org@localhost>
date: Thu Dec 30 15:59:26 1999 +0000
description:
Handle args for 32-bit emulation processes properly.
diffstat:
sys/kern/kern_exec.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (27 lines):
diff -r e1588562ef51 -r 4fa50fbd803d sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c Thu Dec 30 15:57:31 1999 +0000
+++ b/sys/kern/kern_exec.c Thu Dec 30 15:59:26 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.104 1999/11/21 17:04:05 is Exp $ */
+/* $NetBSD: kern_exec.c,v 1.105 1999/12/30 15:59:26 eeh Exp $ */
/*-
* Copyright (C) 1993, 1994, 1996 Christopher G. Demetriou
@@ -345,9 +345,14 @@
szsigcode = pack.ep_emul->e_esigcode - pack.ep_emul->e_sigcode;
/* Now check if args & environ fit into new stack */
- len = ((argc + envc + 2 + pack.ep_emul->e_arglen) * sizeof(char *) +
- sizeof(long) + dp + STACKGAPLEN + szsigcode +
- sizeof(struct ps_strings)) - argp;
+ if (pack.ep_flags & EXEC_32)
+ len = ((argc + envc + 2 + pack.ep_emul->e_arglen) * sizeof(char *) +
+ sizeof(int) + dp + STACKGAPLEN + szsigcode +
+ sizeof(struct ps_strings)) - argp;
+ else
+ len = ((argc + envc + 2 + pack.ep_emul->e_arglen) * sizeof(int) +
+ sizeof(int) + dp + STACKGAPLEN + szsigcode +
+ sizeof(struct ps_strings)) - argp;
len = ALIGN(len); /* make the stack "safely" aligned */
Home |
Main Index |
Thread Index |
Old Index