freebsd-nq/usr.bin/grep/regex
Ian Lepore 79b05c7ff0 Fix a bug in bsdgrep that caused the program to hang in a tight loop for
some combinations of command line options and search patterns.  The code was
examining regexec flags looking for a regcomp flag value.  The fix is to
look in the struct field where the decoded regcomp flag was stored when the
regex was compiled.

With this fix, it's possible to build WITHOUT_GNU_GREP_COMPAT and
WITH_BSDGREP and have a usable GPL-free grep (which of course lacks gnugrep
extensions).  It now passes the kyua tests except for one test that requires
the -z/--null-data gnu extension, and one test involving outputting context
lines across multiple files which appears to sometimes output an extra
delimiter line ("--") between matches (a rather obscure failure of a rather
obscure feature, so bsdgrep should be generally usable now).
2016-03-13 14:53:12 +00:00
..
fastmatch.c
fastmatch.h
glue.h Fix a bug in bsdgrep that caused the program to hang in a tight loop for 2016-03-13 14:53:12 +00:00
hashtable.c
hashtable.h
tre-compile.c
tre-fastmatch.c bsdgrep: Work-around for segmentation fault. 2014-09-25 19:22:26 +00:00
tre-fastmatch.h
xmalloc.c
xmalloc.h