summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-06-11 19:31:14 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-06-11 19:31:14 +0200
commitfa09758a739ad9cb42be295135fad3ab4817e2bb (patch)
treec31c9a5c09061482c1fdde1b6276ca3d73c13b42
parent3a5b2189ed5c5e064912b037c5a3c717de1e791a (diff)
downloadplan9front-fa09758a739ad9cb42be295135fad3ab4817e2bb.tar.xz
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.
-rw-r--r--sys/src/cmd/samterm/plan9.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/src/cmd/samterm/plan9.c b/sys/src/cmd/samterm/plan9.c
index 211bf8884..0022d4b28 100644
--- 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 @@ extstart(void)
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 @@ plumbstart(void)
}
arg[0] =plumbc;
arg[1] = &fd;
- proccreate(plumbproc, arg, 4096);
+ proccreate(plumbproc, arg, STACK);
return 1;
}
@@ -299,5 +303,5 @@ void
hoststart(void)
{
hostc = chancreate(sizeof(int), 0);
- proccreate(hostproc, hostc, 1024);
+ proccreate(hostproc, hostc, STACK);
}