ref: 5430950dba838b7c0c46544d772328e23d59918c
parent: 6892fe5df6468666edd091b6474d0e56419dc336
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Jun 11 15:31:14 EDT 2014
samterm: use 4K stacks for amd64 (thanks burnzez) we got a stack overflow on the hostproc on amd64 overflowing by arround 200 byte. so just use 4K stacks for everything.
--- a/sys/src/cmd/samterm/plan9.c
+++ b/sys/src/cmd/samterm/plan9.c
@@ -9,6 +9,10 @@
#include "flayer.h"
#include "samterm.h"
+enum {+ STACK = 4096,
+};
+
static char exname[64];
void
@@ -172,7 +176,7 @@
plumbc = chancreate(sizeof(int), 0);
arg[0] = plumbc;
arg[1] = &p[1];
- proccreate(extproc, arg, 1024);
+ proccreate(extproc, arg, STACK);
atexit(removeextern);
}
@@ -264,7 +268,7 @@
}
arg[0] =plumbc;
arg[1] = &fd;
- proccreate(plumbproc, arg, 4096);
+ proccreate(plumbproc, arg, STACK);
return 1;
}
@@ -299,5 +303,5 @@
hoststart(void)
{hostc = chancreate(sizeof(int), 0);
- proccreate(hostproc, hostc, 1024);
+ proccreate(hostproc, hostc, STACK);
}
--
⑨