diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-09-21 14:41:04 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-09-21 21:41:47 +0000 |
commit | ec0aeb983b0efc2d2e5e24209a3a0fc198b353d2 (patch) | |
tree | 9687c0fbd4468149335b8c3f12046f045423c03c /tools/fuzz-test.sh | |
parent | c2b7a74c149241a5fa490d9201c04a987e3d3f63 (diff) |
Set the VA limit with ulimit -S, and clean up comments.
Other limits are set with -S, do that with the virtual address space
limit as well.
Change-Id: Ie427341a4c7be56d3e8d96be6c1713c56e9bad87
Reviewed-on: https://code.wireshark.org/review/17846
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tools/fuzz-test.sh')
-rwxr-xr-x | tools/fuzz-test.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tools/fuzz-test.sh b/tools/fuzz-test.sh index f39138cc19..d1ca629dd6 100755 --- a/tools/fuzz-test.sh +++ b/tools/fuzz-test.sh @@ -206,20 +206,26 @@ while [ \( $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 \) -a $DONE -ne 1 ] ; do echo -n "($ARGS) " echo -e "Command and args: $RUNNER $ARGS\n" > $TMP_DIR/$ERR_FILE - # Run in a child process with limits, e.g. stop it if it's running - # longer then MAX_CPU_TIME seconds. (ulimit may not be supported - # well on some platforms, particularly cygwin.) + # Run in a child process with limits. ( + # Set some limits to the child processes, e.g. stop it if + # it's running longer than MAX_CPU_TIME seconds. (ulimit + # is not supported well on cygwin - it shows some warnings - + # and the features we use may not all be supported on some + # UN*X platforms.) ulimit -S -t $MAX_CPU_TIME -s $MAX_STACK + + # Allow core files to be generated ulimit -c unlimited - SUBSHELL_PID=$($SHELL -c 'echo $PPID') # Don't enable ulimit -v when using ASAN. See # https://github.com/google/sanitizers/wiki/AddressSanitizer#ulimit--v if [ $ASAN -eq 0 ]; then - ulimit -v $MAX_VMEM + ulimit -S -v $MAX_VMEM fi + SUBSHELL_PID=$($SHELL -c 'echo $PPID') + "$RUNNER" $COMMON_ARGS $ARGS $TMP_DIR/$TMP_FILE \ > /dev/null 2>> $TMP_DIR/$ERR_FILE.$SUBSHELL_PID ) & |