aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2010-07-07 16:55:42 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2010-07-07 16:55:42 +0000
commit08d3ff4889dcfb31394ba9500cbb32b80e7f2593 (patch)
tree65abbe25bf4a07ae6a2d7f80cc1d645c23782536 /tools
parent750ea20a6c68ec11696f27e3f4179a3ff3301519 (diff)
Try limiting our stack size.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33466 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tools')
-rwxr-xr-xtools/fuzz-test.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/fuzz-test.sh b/tools/fuzz-test.sh
index 13970d39a2..117e715c1d 100755
--- a/tools/fuzz-test.sh
+++ b/tools/fuzz-test.sh
@@ -32,10 +32,17 @@ MAX_PASSES=0
TWO_PASS=
# These may be set to your liking
-# Stop the child process, if it's running longer than x seconds
+# Stop the child process if it's running longer than x seconds
MAX_CPU_TIME=900
-# Stop the child process, if it's using more than y * 1024 bytes
+# Stop the child process if it's using more than y * 1024 bytes
MAX_VMEM=500000
+# Stop the child process if its stack is larger than than z * 1024 bytes
+# Windows XP: 2033
+# Windows 7: 2034
+# OS X 10.6: 8192
+# Linux 2.6.24: 8192
+# Solaris 10: 8192
+MAX_STACK=2033
# Insert z times an error into the capture file (0.02 seems to be a good value to find errors)
ERR_PROB=0.02
# Trigger an abort if a dissector finds a bug.
@@ -69,7 +76,7 @@ fi
# set some limits to the child processes, e.g. stop it if it's running longer then MAX_CPU_TIME seconds
# (ulimit is not supported well on cygwin and probably other platforms, e.g. cygwin shows some warnings)
-ulimit -S -t $MAX_CPU_TIME -v $MAX_VMEM
+ulimit -S -t $MAX_CPU_TIME -v $MAX_VMEM -s $MAX_STACK
ulimit -c unlimited
### usually you won't have to change anything below this line ###