summaryrefslogtreecommitdiff
path: root/NEWS
Commit message (Collapse)AuthorAgeFilesLines
* maint: post-release administriviaHEADmasterJim Meyering2023-05-131-0/+3
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.11v3.11Jim Meyering2023-05-131-1/+1
| | | | * NEWS: Record release date.
* pcre: work around a PCRE2_MATCH_INVALID_UTF bugCarlo Marcelo Arenas Belón2023-04-301-0/+5
| | | | | | | | | | | | | | PCRE2 has a bug when using PCRE2_MATCH_INVALID_UTF: it would sometimes fail to match patterns using negative classes like \W and \D. * NEWS (Bug fixes): Mention it. * src/pcre2search.c: Restrict impact of the bug. Do not use the problematic flag with broken versions of PCRE2. Also, generate locale tables only for single-byte locales, as the PCRE2 documentation recommends this. * tests/Makefile.am (TESTS): Add the file name * tests/pcre-utf8-bug224: New file, to test for this.
* doc: improve doc for -P '\d'Paul Eggert2023-04-291-6/+8
| | | | | | | | | | | | This follows up to Carlo Marcelo Arenas Belón’s email <https://lists.gnu.org/r/grep-devel/2023-04/msg00017.html> that proposed changing the code too. These patches change only the documentation since we’re so near a release. * NEWS: Be less optimistic about the fix for -P '\d', and warn that behavior is likely to change again. * doc/grep.texi (grep Programs): Be less specific about -P \d behavior, since it’s still in flux. Warn about mismatching Unicode versions, or disagreements about obscure constructs.
* build: prevent pkg-config from overriding PCRE_* settingsCarlo Marcelo Arenas Belón2023-04-221-1/+4
| | | | | | | | The use of PCRE_CFLAGS and PCRE_LIBS, as documented in the output of `--help`, is meant to override those settings from pkg-config. * NEWS: mention this * m4/pcre.m4: avoid overriding user provided settings
* doc: note when a bug was introducedJim Meyering2023-04-201-0/+1
| | | | * NEWS: say that the \d bug was introduced in 3.10.
* grep: improve PCRE2 version outputPaul Eggert2023-04-101-2/+2
| | | | | | | | | | * src/grep.c: No need to include pcre2.h. (main) [HAVE_LIBPCRE]: Call Pprint_version instead of doing it ourselves. * src/pcresearch.c (Pprint_version): New function. It also checks belatedly for buffer overflow, and says "grep -P uses PCRE2" instead of "Built with PCRE". * tests/version-pcre: Adjust test to match.
* grep: --version: print pcre version infoJim Meyering2023-04-091-0/+8
| | | | | | | | | | PCRE is integral to the functioning of grep's -P option, so it is in our interest to make it easy to see which version of PCRE grep uses. * src/grep.c [HAVE_LIBPCRE]: Include <pcre2.h>. [HAVE_LIBPCRE] (main): Print pcre version info. * tests/version-pcre: New test for this. * tests/Makefile.am (TESTS): Add the file name. * NEWS (Changes in behavior): Mention it.
* grep: re-fix Y2038 bug on glibc 2.34+ x86, ARMPaul Eggert2023-04-031-0/+4
| | | | | | | | | | The meaning of AC_SYS_LARGEFILE has changed to no longer even try to use wider time_t if available. So use AC_SYS_YEAR2038 as well. A more-aggressive change would be to use the next Autoconf’s AC_SYS_YEAR2038_REQUIRED but at least let’s restore the grep 3.8 behavior. * NEWS: Mention this. * bootstrap.conf: Add year2038.
* grep: fix -P [\d] by fixing \w only if PCRE2 10.43Paul Eggert2023-04-021-0/+8
| | | | | | | | | | | | | | Our prepass-based fixes for the -P \d bug have caused repeated further bugs. Avoid the need for a prepass, by using PCRE2_UCP only if PCRE2_EXTRA_ASCII_BSD is also supported. Since the -P \w bug was present from grep 2.5 through 3.8 it’s OK if we wait a little longer to fix it. * NEWS: Mention this. * src/pcresearch.c (pcre_pattern_expand_backslash_d}: Remove. Remove its use. (Pcompile): Use PCRE2_UCP only if PCRE2_EXTRA_ASCII_BSD. * tests/pcre-ascii-digits, tests/pcre-utf8-w: Skip tests on older PCRE2 implementations.
* maint: post-release administriviaJim Meyering2023-03-221-0/+3
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.10v3.10Jim Meyering2023-03-221-1/+1
| | | | * NEWS: Record release date.
* grep: -P (--perl-regexp) \D once again works like [^0-9]Jim Meyering2023-03-191-1/+1
| | | | | | | | | | | * NEWS: Mention \D, too. * doc/grep.texi: Likewise * src/pcresearch.c (pcre_pattern_expand_backslash_d): Handle \D. Also, ifdef-out this new function and its call site when not needed. * tests/pcre-ascii-digits: Test \D, too. Tighten one test by using returns_ 1. Add comments and tests that work only with 10.43 and newer. Paul Eggert raised the issue of \D in https://bugs.gnu.org/62267#8
* grep: -P (--perl-regexp) \d: match only ASCII digitsJim Meyering2023-03-181-0/+10
| | | | | | | | | | | | | | | | Prior to grep-3.9, the PCRE matcher had always treated \d just like [0-9]. grep-3.9's fix for \w and \b mistakenly relaxed \d to also match multibyte digits. * src/grep.c (P_MATCHER_INDEX): Define enum. (pcre_pattern_expand_backslash_d): New function. (main): Call it for -P. * NEWS (Bug fixes): Mention it. * doc/grep.texi: Document it: with -P, \d matches only ASCII digits. Provide a PCRE documentation URL and an example of how to use (?s) with -z. * tests/pcre-ascii-digits: New test. * tests/Makefile.am (TESTS): Add that file name. Reported as https://bugs.gnu.org/62267
* maint: post-release administriviaJim Meyering2023-03-051-0/+3
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.9v3.9Jim Meyering2023-03-051-1/+1
| | | | * NEWS: Record release date.
* pcre: use UCP in UTF modeCarlo Marcelo Arenas Belón2023-01-071-0/+6
| | | | | | | | | | | | | This fixes a serious bug affecting word-boundary and word-constituent regular expressions when the desired match involves non-ASCII UTF8 characters. * src/pcresearch.c: Set PCRE2_UCP together with PCRE2_UTF * tests/pcre-utf8-w: New file. * tests/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention this. * THANKS.in: Add Gro-Tsen and Karl Petterson. Reported by Gro-Tsen https://twitter.com/gro_tsen/status/1610972356972875777 via Karl Pettersson in https://github.com/PCRE2Project/pcre2/issues/185 This bug was present from grep-2.5, when --perl-regexp (-P) support was added.
* maint: update copyright datesJim Meyering2023-01-011-1/+1
|
* grep: bug: backref in last of multiple patternsPaul Eggert2022-12-051-0/+6
| | | | | | | | * NEWS: Mention this. * src/dfasearch.c (GEAcompile): Trim trailing newline from the last pattern, even if it has back-references and follows a pattern that lacks back-references. * tests/backref: Add test for this bug.
* maint: post-release administriviaJim Meyering2022-09-021-0/+3
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.8v3.8Jim Meyering2022-09-021-1/+1
| | | | * NEWS: Record release date.
* maint: spelling fixesPaul Eggert2022-06-031-1/+1
|
* grep: sanity-check GREP_COLORPaul Eggert2022-05-311-0/+2
| | | | | | | | | | | | | | This patch closes a longstanding security issue with GREP_COLOR that I just noticed, where if the attacker has control over GREP_COLOR's settings the attacker can trash the victim's terminal or have 'grep' generate misleading output. For example, without the patch the shell command: GREP_COLOR="$(printf '31m\33[2J\33[31')" grep --color=always PATTERN mucks with the screen, leaving behind only the trailing part of the last matching line. With the patch, this GREP_COLOR is ignored. * src/grep.c (main): Sanity-check GREP_COLOR contents the same way GREP_COLORS values are checked, to not trash the user's terminal. This follows up the recent fix to Bug#55641.
* grep: deprecate GREP_COLORPaul Eggert2022-05-291-0/+4
| | | | | | This is to avoid confusion such as that reported by Cholden in: https://bugs.gnu.org/55641 * src/grep.c (main): Warn if GREP_COLOR has an effect.
* maint: fix typo in bug numberPaul Eggert2022-05-241-1/+1
|
* grep: warn about ‘(+x)’ etc.Paul Eggert2022-05-241-1/+4
| | | | | | | | | These expressions are not portable and don’t always work as expected, so warn about them. For example, “grep -E '(+)'” doesn’t act like “grep '\(\+\)'”. * src/dfasearch.c (GEAcompile): Warn about a repetition op at the start of a regular expression or subexpression, except for ‘*’ in BREs which is portable.
* grep: warn about stray backslashesPaul Eggert2022-05-231-0/+6
| | | | | | | | | | | | This papers over a problem reported by Benno Schulenberg and Tomasz Dziendzielski <https://bugs.gnu.org/39678> involving regular expressions like \a that have unspecified behavior. * src/dfasearch.c (dfawarn): Just output a warning. Don’t exit, as DFA_CONFUSING_BRACKETS_ERROR now does that for us, and we need the ability to warn without exiting to diagnose \a etc. (GEAcompile): Use new dfa options DFA_CONFUSING_BRACKETS_ERROR and DFA_STRAY_BACKSLASH_WARN.
* doc: document regex corner cases betterPaul Eggert2022-05-221-0/+5
| | | | | | | | | * doc/grep.texi (Environment Variables) (Fundamental Structure, Character Classes and Bracket Expressions) (Special Backslash Expressions, Back-references and Subexpressions) (Basic vs Extended): Say more precisely what happens with problematic regular expressions. (Problematic Expressions): New section.
* grep: assume POSIX.1-2017 for [:space:]Paul Eggert2022-05-211-0/+3
| | | | | | | * src/dfasearch.c (dfawarn): Always call dfaerror now, regardless of POSIXLY_CORRECT. * tests/warn-char-classes: Omit test of POSIX.1-2008 behavior, since POSIX.1-2017 allows the GNU behavior.
* grep: fix bug with . and some Hangul SyllablesPaul Eggert2022-05-131-0/+7
| | | | | | * NEWS: Mention the fix, which comes from the recent Gnulib update. * tests/hangul-syllable: New file. * tests/Makefile.am (TESTS): Add it.
* maint: make update-copyrightJim Meyering2022-01-011-1/+1
|
* grep: -s does not suppress “binary file matches”Paul Eggert2021-11-201-0/+5
| | | | | * src/grep.c (grep): Implement this. * tests/binary-file-matches: Add regression test.
* maint: minor rewording and reindentingPaul Eggert2021-11-141-0/+4
|
* egrep, fgrep: now obsoletePaul Eggert2021-08-161-0/+5
| | | | | | | | | | | | | * NEWS: Mention this (see bug#49996). * doc/Makefile.am (egrep.1 fgrep.1): Remove. All uses removed. * doc/grep.in.1, doc/grep.texi (grep Programs): Remove documentation for egrep, fgrep. * doc/grep.texi (Usage): Add FAQ for egrep and fgrep. * src/Makefile.am (shell_does_substrings): Substitute for ${0##*/}, not for ${0%/\*} (which was not being used anyway). * src/egrep.sh: Issue an obsolescence warning. * tests/fedora: Use "grep -F" instead of "fgrep" in diagnostics, as this tests "grep -F" not "fgrep".
* maint: post-release administriviaJim Meyering2021-08-141-0/+3
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.7v3.7Jim Meyering2021-08-141-1/+1
| | | | * NEWS: Record release date.
* maint: run "make update-copyright"Paul Eggert2021-01-011-1/+1
|
* grep: use of --unix-byte-offsets (-u) now elicits a warningJim Meyering2020-12-251-0/+5
| | | | | | | * NEWS (Change in behavior): Mention this. * src/grep.c (main): Warn about each use of obsolete --unix-byte-offsets (-u). * doc/grep.in.1 (-u): Remove its documentation.
* grep: avoid performance regression with many patternsJim Meyering2020-11-261-0/+7
| | | | | | | | | | * src/grep.c (hash_pattern): Switch from PJW to DJB2, to avoid an O(N) to O(N^2) performance regression due to hash collisions with patterns from e.g., seq 500000|tr 0-9 A-J Reported by Frank Heckenbach in https://bugs.gnu.org/44754 * NEWS (Bug fixes): Mention it. * tests/hash-collision-perf: New file. * tests/Makefile.am (TESTS): Add it.
* maint: post-release administriviaJim Meyering2020-11-081-0/+3
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.6v3.6Jim Meyering2020-11-081-1/+1
| | | | * NEWS: Record release date.
* grep: remove GREP_OPTIONSPaul Eggert2020-11-031-0/+6
| | | | | | | | | | | | * 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.
* grep: avoid erroneous matches for e.g., a+a+a+Jim Meyering2020-11-011-0/+5
| | | | | * gnulib: Update to latest, for dfa's invalid-merge fix. * NEWS (Bug fixes): Mention this.
* grep: -P: report input filename upon PCRE execution failureJim Meyering2020-10-111-0/+7
| | | | | | | | | | | | 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.
* maint: post-release administriviaJim Meyering2020-09-271-0/+3
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.5v3.5Jim Meyering2020-09-271-1/+1
| | | | * NEWS: Record release date.
* grep: fix more Turkish-eyes bugsPaul Eggert2020-09-231-1/+1
| | | | | | | | | | | | | | | | | 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.
* build: update gnulib submodule to latestPaul Eggert2020-09-231-0/+6
| | | | * NEWS: Mention Bug#43577, which this fixes.
* tests: test for many-regexp N^2 RSS regressionJim Meyering2020-09-221-0/+8
| | | | | | | * tests/many-regex-performance: New test for this performance regression. * tests/Makefile.am: Add it. * NEWS (Bug fixes): Describe it.
* grep: be more consistent about diagnostic formatPaul Eggert2020-09-181-3/+9
| | | | | | | | | | * 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.