Skip to content

Commit

Permalink
File and documentation tidies for 10.41 release
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipHazel committed Dec 6, 2022
1 parent 106faa2 commit 7c49b40
Show file tree
Hide file tree
Showing 22 changed files with 143 additions and 113 deletions.
46 changes: 24 additions & 22 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ Change Log for PCRE2 - see also the Git log
-------------------------------------------


Version 10.41 xx-xxx-2022
-------------------------
Version 10.41 06-December-2022
------------------------------

1. Add fflush() before and after a fork callout in pcre2grep to get its output
to be the same on all systems. (THere were previously ordering differences in
to be the same on all systems. (There were previously ordering differences in
Alpine Linux).

2. Merged patch from @carenas (GitHub #110) for pthreads support in CMake.
Expand All @@ -32,35 +32,35 @@ tidied up an untidy #ifdef arrangement in pcre2test.
8. Fixed an issue in the backtracking optimization of character repeats in
JIT. Furthermore optimize star repetitions, not just plus repetitions.

9. Removed the use of an initial backtracking frames vector on the system stack
in pcre2_match() so that it now always uses the heap. (In a multi-thread
environment with very small stacks there had been an issue.) This also is
tidier for JIT matching, which didn't need that vector. The heap vector is now
remembered in the match data block and re-used if that block itself is re-used.
9. Removed the use of an initial backtracking frames vector on the system stack
in pcre2_match() so that it now always uses the heap. (In a multi-thread
environment with very small stacks there had been an issue.) This also is
tidier for JIT matching, which didn't need that vector. The heap vector is now
remembered in the match data block and re-used if that block itself is re-used.
It is freed with the match data block.

10. Adjusted the find_limits code in pcre2test to work with change 9 above.

11. Added find_limits_noheap to pcre2test, because the heap limits are now
different in different environments and so cannot be included in the standard
11. Added find_limits_noheap to pcre2test, because the heap limits are now
different in different environments and so cannot be included in the standard
tests.

12. Created a test for pcre2_match() heap processing that is not part of the
tests run by 'make check', but can be run manually. The current output is from
12. Created a test for pcre2_match() heap processing that is not part of the
tests run by 'make check', but can be run manually. The current output is from
a 64-bit system.

13. Implemented -Z aka --null in pcre2grep.

14. A minor change to pcre2test and the addition of several new pcre2grep tests
have improved LCOV coverage statistics. At the same time, code in pcre2grep and
have improved LCOV coverage statistics. At the same time, code in pcre2grep and
elsewhere that can never be obeyed in normal testing has been excluded from
coverage.

15. Fixed a bug in pcre2grep that could cause an extra newline to be written
after output generaed by --output.

16. If a file has a .bz2 extension but is not in fact compressed, pcre2grep
should process it as a plain text file. A bug stopped this happening; now fixed
16. If a file has a .bz2 extension but is not in fact compressed, pcre2grep
should process it as a plain text file. A bug stopped this happening; now fixed
and added to the tests.

17. When pcre2grep was running not in UTF mode, if a string specified by
Expand All @@ -75,20 +75,22 @@ pointers had out of place PCRE2_CALL_CONVENTION in src/pcre2.h.*. These
produced errors when building for Windows with #define PCRE2_CALL_CONVENTION
__stdcall.

20. A negative repeat value in a pcre2test subject line was not being
20. A negative repeat value in a pcre2test subject line was not being
diagnosed, leading to infinite looping.

21. Updated RunGrepTest to discard the warning that Bash now gives when setting
LC_CTYPE to an bad value (because older versions didn't).
21. Updated RunGrepTest to discard the warning that Bash now gives when setting
LC_CTYPE to a bad value (because older versions didn't).

22. Updated pcre2grep so that it behaves like GNU grep when matching more than
one pattern and a later pattern matches at an earlier point in the subject when
22. Updated pcre2grep so that it behaves like GNU grep when matching more than
one pattern and a later pattern matches at an earlier point in the subject when
the matched substrings are being identified by colour or by offsets.

23. Updated the PrepareRelease script so that the man page that it makes for
the pcre2demo demonstration program is more standard and does not cause errors
23. Updated the PrepareRelease script so that the man page that it makes for
the pcre2demo demonstration program is more standard and does not cause errors
when processed by lexgrog or mandb -c (GitHub issue #160).

24. The JIT compiler was updated.


Version 10.40 15-April-2022
---------------------------
Expand Down
12 changes: 12 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -632,15 +632,23 @@ EXTRA_DIST += \
testdata/grepinput \
testdata/grepinput3 \
testdata/grepinput8 \
testdata/grepinputC.bz2 \
testdata/grepinputC.gz \
testdata/grepinputM \
testdata/grepinputv \
testdata/grepinputx \
testdata/greplist \
testdata/grepnot.bz2 \
testdata/grepoutput \
testdata/grepoutput8 \
testdata/grepoutputC \
testdata/grepoutputCN \
testdata/grepoutputCNU \
testdata/grepoutputCU \
testdata/grepoutputCbz2 \
testdata/grepoutputCgz \
testdata/grepoutputN \
testdata/grepoutputUN \
testdata/greppatN4 \
testdata/testbtables \
testdata/testinput1 \
Expand Down Expand Up @@ -670,6 +678,7 @@ EXTRA_DIST += \
testdata/testinput25 \
testdata/testinput26 \
testdata/testinputEBC \
testdata/testinputheap \
testdata/testoutput1 \
testdata/testoutput2 \
testdata/testoutput3 \
Expand Down Expand Up @@ -713,6 +722,9 @@ EXTRA_DIST += \
testdata/testoutput25 \
testdata/testoutput26 \
testdata/testoutputEBC \
testdata/testoutputheap-16 \
testdata/testoutputheap-32 \
testdata/testoutputheap-8 \
testdata/valgrind-jit.supp \
testdata/wintestinput3 \
testdata/wintestoutput3 \
Expand Down
10 changes: 10 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ News about PCRE2 releases
-------------------------


Version 10.41 06-December-2022
------------------------------

This is another mainly bug-fixing and code-tidying release. There is one
significant upgrade to pcre2grep: it now behaves like GNU grep when matching
more than one pattern and a later pattern matches at an earlier point in the
subject when the matched substrings are being identified by colour or by
offsets.


Version 10.40 15-April-2022
---------------------------

Expand Down
2 changes: 1 addition & 1 deletion RunGrepTest
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ if [ $? -ne 0 ]; then
echo "RC=2" >>testtrygrep
else

# Bash has started giving a warning when LC_CTYPE is set to a bad value. In
# Bash has started giving a warning when LC_CTYPE is set to a bad value. In
# order to remain compatible with older versions, the following code is a bit
# contorted.

Expand Down
10 changes: 5 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ dnl be defined as -RC2, for example. For real releases, it should be empty.
m4_define(pcre2_major, [10])
m4_define(pcre2_minor, [41])
m4_define(pcre2_prerelease, [])
m4_define(pcre2_date, [2022-xx-xx])
m4_define(pcre2_date, [2022-12-06])

# Libtool shared library interface versions (current:revision:age)
m4_define(libpcre2_8_version, [11:0:11])
m4_define(libpcre2_16_version, [11:0:11])
m4_define(libpcre2_32_version, [11:0:11])
m4_define(libpcre2_posix_version, [3:2:0])
m4_define(libpcre2_8_version, [11:1:11])
m4_define(libpcre2_16_version, [11:1:11])
m4_define(libpcre2_32_version, [11:1:11])
m4_define(libpcre2_posix_version, [3:3:0])

# NOTE: The CMakeLists.txt file searches for the above variables in the first
# 50 lines of this file. Please update that if the variables above are moved.
Expand Down
2 changes: 1 addition & 1 deletion doc/html/pcre2api.html
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ <h1>pcre2api man page</h1>
NULL immediately. Otherwise, the variables to which these point are set to an
error code and an offset (number of code units) within the pattern,
respectively, when <b>pcre2_compile()</b> returns NULL because a compilation
error has occurred.
error has occurred.
</P>
<P>
There are nearly 100 positive error codes that <b>pcre2_compile()</b> may return
Expand Down
10 changes: 5 additions & 5 deletions doc/html/pcre2grep.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h1>pcre2grep man page</h1>
BUFSIZ is defined in <b>&#60;stdio.h&#62;</b>. When there is more than one pattern
(specified by the use of <b>-e</b> and/or <b>-f</b>), each pattern is applied to
each line in the order in which they are defined, except that all the <b>-e</b>
patterns are tried before the <b>-f</b> patterns.
patterns are tried before the <b>-f</b> patterns.
</P>
<P>
By default, as soon as one pattern matches a line, no further patterns are
Expand All @@ -123,8 +123,8 @@ <h1>pcre2grep man page</h1>
match that starts in the middle of another match will not be processed.
</P>
<P>
The above behaviour was changed at release 10.41 to be more compatible with GNU
grep. In earlier releases, <b>pcre2grep</b> did not recognize matches from
The above behaviour was changed at release 10.41 to be more compatible with GNU
grep. In earlier releases, <b>pcre2grep</b> did not recognize matches from
later patterns that were earlier in the subject.
</P>
<P>
Expand Down Expand Up @@ -325,7 +325,7 @@ <h1>pcre2grep man page</h1>
<br>
If <b>-f</b> is used with <b>-e</b>, the command line patterns are matched first,
followed by the patterns from the file(s), independent of the order in which
these options are specified.
these options are specified.
</P>
<P>
<b>--exclude</b>=<i>pattern</i>
Expand Down Expand Up @@ -487,7 +487,7 @@ <h1>pcre2grep man page</h1>
<b>-L</b>, <b>--files-without-match</b>
Instead of outputting lines from the files, just output the names of the files
that do not contain any lines that would have been output. Each file name is
output once, on a separate line by default, but if the <b>-Z</b> option is set,
output once, on a separate line by default, but if the <b>-Z</b> option is set,
they are separated by zero bytes instead of newlines. This option overrides any
previous <b>-H</b>, <b>-h</b>, or <b>-l</b> options.
</P>
Expand Down
4 changes: 2 additions & 2 deletions doc/html/pcre2limits.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ <h1>pcre2limits man page</h1>
32-bit unsigned integer can hold.
</P>
<P>
The maximum amount of heap memory used for matching is controlled by the heap
limit, which can be set in a pattern or in a match context. The default is a
The maximum amount of heap memory used for matching is controlled by the heap
limit, which can be set in a pattern or in a match context. The default is a
very large number, effectively unlimited.
</P>
<br><b>
Expand Down
14 changes: 7 additions & 7 deletions doc/html/pcre2perform.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h1>pcre2perform man page</h1>
uses very little system stack at run time. In earlier releases recursive
function calls could use a great deal of stack, and this could cause problems,
but this usage has been eliminated. Backtracking positions are now explicitly
remembered in memory frames controlled by the code.
remembered in memory frames controlled by the code.
</P>
<P>
The size of each frame depends on the size of pointer variables and the number
Expand All @@ -92,7 +92,7 @@ <h1>pcre2perform man page</h1>
capturing group the size increases by 16 bytes.
</P>
<P>
Until release 10.41, an initial 20KiB frames vector was allocated on the system
Until release 10.41, an initial 20KiB frames vector was allocated on the system
stack, but this still caused some issues for multi-thread applications where
each thread has a very small stack. From release 10.41 backtracking memory
frames are always held in heap memory. An initial heap allocation is obtained
Expand All @@ -101,12 +101,12 @@ <h1>pcre2perform man page</h1>
another match. It is freed when the match data block itself is freed.
</P>
<P>
The size of the initial block is the larger of 20KiB or ten times the pattern's
frame size, unless the heap limit is less than this, in which case the heap
The size of the initial block is the larger of 20KiB or ten times the pattern's
frame size, unless the heap limit is less than this, in which case the heap
limit is used. If the initial block proves to be too small during matching, it
is replaced by a larger block, subject to the heap limit. The heap limit is
checked only when a new block is to be allocated. Reducing the heap limit
between calls to <b>pcre2_match()</b> with the same match data block does not
is replaced by a larger block, subject to the heap limit. The heap limit is
checked only when a new block is to be allocated. Reducing the heap limit
between calls to <b>pcre2_match()</b> with the same match data block does not
affect the saved block.
</P>
<P>
Expand Down

0 comments on commit 7c49b40

Please sign in to comment.