| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* NEWS: Record release date.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* NEWS: Mention this.
* doc/grep.in.1:
Remove GREP_OPTIONS documentation.
* doc/grep.texi (Environment Variables):
Move GREP_OPTIONS stuff into a “no longer implemented” paragraph.
* src/grep.c (prepend_args, prepend_default_options): Remove.
(main): Do not look at GREP_OPTIONS.
* tests/Makefile.am (TESTS_ENVIRONMENTS):
* tests/init.cfg (vars_): Remove GREP_OPTIONS.
|
|
|
|
|
|
|
| |
* src/dfasearch.c (regex_compile): New parameter. All callers changed.
(GEAcompile): Move setting syntax for regex into regex_compile()
function. This addresses a performance problem exposed by extreme
regular expressions, as described in https://bugs.gnu.org/43862 .
|
|
|
|
| |
* tests/ere.tests: Add new test.
|
|
|
|
|
| |
* gnulib: Update to latest, for dfa's invalid-merge fix.
* NEWS (Bug fixes): Mention this.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this, it could be tedious to determine which input
file evokes a PCRE-execution-time failure.
* src/pcresearch.c (Pexecute): When failing, include the
error-provoking file name in the diagnostic.
* src/grep.c (input_filename): Make extern, since used above.
* src/search.h (input_filename): Declare.
* tests/filename-lineno.pl: Test for this.
($no_pcre): Factor out.
* NEWS (Bug fixes): Mention this.
|
|
|
|
|
|
|
|
|
| |
* src/kwsearch.c (Fexecute):
Assume C99 to put declarations nearer uses.
* src/kwset.c (bmexec): Omit unnecessary test.
* src/kwset.h (struct kwsmatch): Make OFFSET and SIZE individual
elements, not arrays of size 1 (a revenant of an earlier API).
All uses changed.
|
|
|
|
|
| |
* src/kwsearch.c (Fcompile, Fexecute): Remove unused code. No longer these
are used after commit 016e590a8198009bce0e1078f6d4c7e037e2df3c.
|
| |
|
|
|
|
|
| |
* tests/filename-lineno.pl: Remove a stray envvar
that somehow slipped into expected output string.
|
|
|
|
|
|
|
|
|
| |
* tests/Makefile.am (TESTS_ENVIRONMENT):
Set PATH before setting PCRE_WORKS, so that the latter test
uses the just-built grep.
* tests/filename-lineno.pl (invalid-re-P-paren)
(invalid-re-P-star-paren): Adjust non-PCRE case to match
recently-changed behavior.
|
| |
|
|
|
|
|
|
|
|
| |
Problem reported by John Ruckstuhl (Bug#43782).
* doc/grep.texi (File and Directory Selection):
Document what happens if contradictory options are given,
or if no option matches a file name.
* doc/grep.in.1:
|
|
|
|
|
| |
* configure.ac: Quote args of AC_CONFIG_AUX_DIR, AC_CONFIG_SRCDIR
and AC_CHECK_FUNCS_ONCE.
|
|
|
|
|
|
|
|
|
|
|
| |
v3.4-almost-45-g8577dda deleted these two -P-using tests because a
grep built without PCRE support would fail those tests. This sets
an envvar with the equivalent of the result from the require_pcre_
function and restores the now-guarded tests. Tested by running this:
./configure --disable-perl-regexp && make check
* tests/Makefile.am (PCRE_WORKS): Set this envvar.
* tests/filename-lineno.pl: Restore invalid-re-P-paren and
invalid-re-P-star-paren, now each with a guard.
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
|
|
|
|
| |
* configure.ac (AC_HEADER_STDC): Remove. It's been assumed for ages.
* m4/pcre.m4 (gl_FUNC_PCRE): Use AS_HELP_STRING, not AC_HELP_STRING.
|
| |
|
| |
|
|
|
|
|
| |
* tests/stack-overflow: Skip this test when the binary was built
with ASAN, to avoid spurious failures.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* tests/surrogate-pair: Avoid new failure on systems with
16-bit wchar_t. Detect the condition and exit before the
otherwise-failing tests. Remove the now-incorrect in-loop
test for that alternate failure mode. This was exposed by
testing on gcc119.fsffrance.org, a power8 AIX 7.2 system.
|
|
|
|
|
|
|
| |
* tests/filename-lineno.pl: Remove invalid-re-P-paren and
invalid-re-P-star-paren as they assume PCRE support, which
causes a false alarm "grep: Perl matching not supported in a
--disable-perl-regexp build" on platforms without PCRE.
|
|
|
|
|
|
|
| |
This suppresses a false alarm '"grep.c", line 720: warning:
initializer will be sign-extended: -1'.
* src/grep.c (uword_max): New static constant.
(initialize_unibyte_mask): Use it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix more bugs recently uncovered by Norihiro Tanaka (Bug#43577).
* NEWS: Mention new bug report.
* src/grep.c (ok_fold): New static var.
(setup_ok_fold): New function.
(fgrep_icase_charlen): Reject single-byte characters
if they match some multibyte characters when ignoring case.
This part of the patch is partly derived from
<https://bugs.gnu.org/43577#14>, which means it is:
Co-authored-by: Norihiro Tanaka <noritnk@kcn.ne.jp>
(main): Call setup_ok_fold if ok_fold might be needed.
* src/searchutils.c (kwsinit): With the grep.c changes,
this code can now revert to classic 7th Edition Unix style;
aborting would be wrong.
* tests/turkish-eyes: Add tests for these bugs.
|
|
|
|
| |
* NEWS: Mention Bug#43577, which this fixes.
|
|
|
|
|
|
| |
* src/grep.c (main): Do not double-increment update_patterns.
update_patterns increments n_patterns now; do not increment it
again, as the incorrect count would hurt performance heuristics later.
|
|
|
|
|
|
| |
* doc/grep.texi (Other Options): Document --line-buffered more
carefully, and say what happens when it is not used. Problem
reported by Dan Jacobson (Bug#35339).
|
|
|
|
|
|
|
|
| |
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/grep-devel/2020-09/msg00080.html
* tests/init.cfg (require_timeout_): Check that ‘timeout 0.01
sleep 0.02’ works as expected, to avoid spurious test failure
on Alpine.
|
|
|
|
|
|
|
| |
* tests/many-regex-performance: New test for this performance
regression.
* tests/Makefile.am: Add it.
* NEWS (Bug fixes): Describe it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Grep resorts to using the regex engine when the precision of either
-o or --color is required, or when the pattern is not supported by
our DFA engine (e.g., backref). Otherwise, grep would perform regex
compilation solely to check the syntax. This change makes grep skip
that compilation in the common case for which it is unnecessary.
The compilation we are avoiding is quite costly, consuming O(N^2)
RSS for N regular expressions.
* src/dfasearch.c (GEAcompile): Add new argument, and avoid unneeded
compilation of regex.
* src/grep.c (compile_fp_t): Update prototype.
(main): Update caller.
* src/kwsearch.c (Fcompile): Update caller and add new argument.
* src/pcresearch.c (Pcompile): Add new argument.
* src/search.h (GEAcompile, Fcompile, Pcompile): Update prototype.
|
| |
|
|
|
|
|
|
| |
* tests/stack-overflow: skip_ when run on this OS. See details
in https://lists.gnu.org/r/grep-devel/2020-09/msg00062.html
* tests/Makefile.am (host_triplet): Export.
|
|
|
|
|
|
|
| |
From a suggestion in Bug#41004.
* doc/grep.texi (Character Encoding, Matching Non-ASCII):
New sections. Move some material from Environment Variables
into these sections.
|
| |
|
|
|
|
|
|
|
| |
* src/grep.c (try_fgrep_pattern): With -G, pass \) through to
GEAcompile so that it can complain. This fixes an unexpected
change in behavior from grep 3.4 and earlier.
* tests/filename-lineno.pl: Add tests for this sort of thing.
|
|
|
|
|
| |
* src/grep.c (try_fgrep_pattern): Tweak previous change
by using mempcpy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The same applied for many other backslash-escaped bytes, not just
metacharacters. The switch to rawmemchr in v3.4-almost-10-g9393b97
made some parts of the code require the usually-guaranteed newline
sentinel at the end of each pattern. Before, some consumers used a
(correct) pattern length and did not care that try_fgrep_pattern could
transform a pattern (with sentinel) like "\\.\n" to "..\n", thus
violating that assumption.
* src/grep.c (try_fgrep_pattern): Preserve the invariant
that each regexp is newline-terminated.
* tests/backslash-dot: New file. Test for this.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
| |
* tests/triple-backref (MALLOC_CHECK_): And tell glibc not to
bother with a core dump. Suggested by Pádraig Brady.
|
|
|
|
|
|
|
|
|
|
| |
* NEWS: Mention this.
* bootstrap.conf (gnulib_modules): Remove 'quote'.
* src/grep.c: Do not include quote.h.
(grep, grepdirent, grepdesc): Put the three unusual diagnostics
into the same "grep: FOO: message" form that grep uses elsewhere.
* tests/binary-file-matches, tests/in-eq-out-infloop:
Adjust tests to match new diagnostic format.
|
| |
|
| |
|
|
|
|
| |
* tests/binary-file-matches: Make this executable.
|
|
|
|
|
| |
* tests/binary-file-matches: New file.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
|
|
|
| |
* src/grep.c (grep): Lower-case the "B" in "Binary file... matches"
diagnostic that we now emit to stderr. This avoids the following
when running "make syntax-check":
maint.mk: found capitalized error message
make: *** [maint.mk:469: sc_error_message_uppercase] Error 1
|
|
|
|
|
|
|
|
|
|
|
| |
* NEWS, doc/grep.texi: Mention this change (Bug#29668).
* src/grep.c (grep): Send "Binary file FOO matches" to stderr
instead of stdout.
* tests/encoding-error, tests/invalid-multibyte-infloop:
* tests/null-byte, tests/pcre-count, tests/surrogate-pair:
* tests/symlink, tests/unibyte-binary:
Adjust tests to match new behavior. In all cases this
simplifies the tests, which is a good sign.
|