diff options
author | Jim Meyering <meyering@fb.com> | 2017-12-12 09:05:55 -0800 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2017-12-16 11:28:52 -0800 |
commit | 51ef8adb2f7eeb073ba98be4f6baf56817e4d358 (patch) | |
tree | 6816cde93dfe6eedce330ad4ceccc57942c9e1aa /bootstrap.conf | |
parent | 6ada8b0a1b3f408ebf76e0cf7f7bb61019a70fdc (diff) | |
download | grep-51ef8adb2f7eeb073ba98be4f6baf56817e4d358.tar.gz |
grep: diagnose stack overflow rather than segfaulting
* bootstrap.conf (gnulib_modules): Add c-stack.
* src/grep.c: Include "c-stack.h".
(main): Call c_stack_action (NULL);
* tests/stack-overflow: New file.
* tests/Makefile.am (TESTS): Add name of new file.
* NEWS (Improvements): Mention it.
Interestingly, this bug does not afflict grep-2.5.4 or prior,
so it appeared to have been introduced with grep-2.6. However,
the origin is in glibc's regexp compiler, and I tracked it to
stack-aware parsing that was removed from glibc's regexp in 2002.
However, grep-2.5.4 was released in 2009. That version worked
(and still works, now) because it included and (by default) used
an old copy of glibc's regexp code.
Jeremy Feusi reported the grep segfault in https://bugs.gnu.org/29666.
I reported the glibc regexp bug in
https://sourceware.org/bugzilla/show_bug.cgi?id=22620
Diffstat (limited to 'bootstrap.conf')
-rw-r--r-- | bootstrap.conf | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bootstrap.conf b/bootstrap.conf index 73f1573d..185cd195 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -27,6 +27,7 @@ alloca announce-gen argmatch c-ctype +c-stack closeout dfa do-release-commit-and-tag |