diff options
author | Bruno Haible <bruno@clisp.org> | 2018-12-17 22:07:25 -0800 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2018-12-17 22:07:25 -0800 |
commit | 71b19c5cbdaa5f130380bca2475b935fef0b1b21 (patch) | |
tree | 1a4dd408583cfbc9581387e49e3714889f6ca05d | |
parent | 41d17c3f0ef3043c66f40349358fe9e88ca48582 (diff) | |
download | grep-71b19c5cbdaa5f130380bca2475b935fef0b1b21.tar.gz |
tests: stack-overflow: avoid unwarranted test failure on some hosts
* tests/stack-overflow: Use ulimit to limit stack size. Otherwise,
at least on gcc113, grep would fail to overflow its stack, so this
test would fail to find the required diagnostic and would fail.
-rwxr-xr-x | tests/stack-overflow | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/stack-overflow b/tests/stack-overflow index b80a8bed..1e100814 100755 --- a/tests/stack-overflow +++ b/tests/stack-overflow @@ -5,6 +5,11 @@ echo grep: stack overflow > exp || framework_failure_ +# Limit stack size. Otherwise, it appears to be too hard to overflow the +# stack on some systems like gcc113, aarch64/linux-3.13.0 with 32GB of RAM +# and 20GB of swap. +ulimit -s 8192 2>/dev/null + # grep attempts to detect overflow via gnulib's c-stack module. # Trigger that with an input regex composed solely of open parentheses, # increasing the size of that input until grep emits the expected diagnostic. |