From a731801899b5f81314e4f4bf49aa55703d7a4ef4 Mon Sep 17 00:00:00 2001 From: Jim Rees Date: Tue, 8 Jan 2008 17:18:57 +0000 Subject: [PATCH] obsd-more-stack-20080108 make stack bigger in volserver and fileserver eliminates overflow in k5 library --- src/viced/viced.c | 6 +++++- src/volser/volmain.c | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/viced/viced.c b/src/viced/viced.c index 6985be1ce..2afb6aedd 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -2047,12 +2047,16 @@ main(int argc, char *argv[]) rx_SetBusyThreshold(busy_threshold, VBUSY); rx_SetCallAbortThreshold(abort_threshold); rx_SetConnAbortThreshold(abort_threshold); +#ifdef AFS_XBSD_ENV + stackSize = 128 * 1024; +#else stackSize = lwps * 4000; if (stackSize < 32000) stackSize = 32000; else if (stackSize > 44000) stackSize = 44000; -#if defined(AFS_HPUX_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SGI51_ENV) +#endif +#if defined(AFS_HPUX_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SGI51_ENV) || defined(AFS_XBSD_ENV) rx_SetStackSize(1, stackSize); #endif if (udpBufSize) diff --git a/src/volser/volmain.c b/src/volser/volmain.c index e31ceb893..3f896c158 100644 --- a/src/volser/volmain.c +++ b/src/volser/volmain.c @@ -511,10 +511,12 @@ main(int argc, char **argv) if (lwps < 4) lwps = 4; rx_SetMaxProcs(service, lwps); -#ifdef AFS_SGI_ENV - rx_SetStackSize(service, 49152); +#if defined(AFS_XBSD_ENV) + rx_SetStackSize(service, (128 * 1024)); +#elif defined(AFS_SGI_ENV) + rx_SetStackSize(service, (48 * 1024)); #else - rx_SetStackSize(service, 32768); + rx_SetStackSize(service, (32 * 1024)); #endif service = -- 2.39.5