2014-08-26 17:41:31 +02:00
|
|
|
Change Log for PCRE2
|
|
|
|
--------------------
|
|
|
|
|
2016-01-29 16:01:17 +01:00
|
|
|
|
2016-08-03 11:01:02 +02:00
|
|
|
Version 10.23 xx-xxxxxx-2016
|
|
|
|
----------------------------
|
|
|
|
|
|
|
|
1. Extended pcre2test with the utf8_input modifier so that it is able to
|
|
|
|
generate all possible 16-bit and 32-bit code unit values in non-UTF modes.
|
|
|
|
|
2016-08-03 19:22:59 +02:00
|
|
|
2. In any wide-character mode (8-bit UTF or any 16-bit or 32-bit mode), without
|
|
|
|
PCRE2_UCP set, a negative character type such as \D in a positive class should
|
|
|
|
cause all characters greater than 255 to match, whatever else is in the class.
|
|
|
|
There was a bug that caused this not to happen if a Unicode property item was
|
|
|
|
added to such a class, for example [\D\P{Nd}] or [\W\pL].
|
|
|
|
|
2016-10-02 18:01:01 +02:00
|
|
|
3. There has been a major re-factoring of the pcre2_compile.c file. Most syntax
|
|
|
|
checking is now done in the pre-pass that identifies capturing groups. This has
|
|
|
|
reduced the amount of duplication and made the code tidier. While doing this,
|
|
|
|
some minor bugs and Perl incompatibilities were fixed, including:
|
|
|
|
|
|
|
|
(a) \Q\E in the middle of a quantifier such as A+\Q\E+ is now ignored instead
|
|
|
|
of giving an invalid quantifier error.
|
|
|
|
(b) {0} can now be used after a group in a lookbehind assertion; previously
|
|
|
|
this caused an "assertion is not fixed length" error.
|
|
|
|
(c) Perl always treats (?(DEFINE) as a "define" group, even if a group with
|
|
|
|
the name "DEFINE" exists. PCRE2 now does likewise.
|
|
|
|
(d) A recursion condition test such as (?(R2)...) must now refer to an
|
|
|
|
existing subpattern.
|
2016-10-13 18:08:08 +02:00
|
|
|
(e) A conditional recursion test such as (?(R)...) misbehaved if there was a
|
|
|
|
group whose name began with "R".
|
2016-10-02 18:01:01 +02:00
|
|
|
|
|
|
|
One effect of the refactoring is that some error numbers and messages have
|
|
|
|
changed, and the pattern offset given for compiling errors is not always the
|
|
|
|
right-most character that has been read. In particular, for a variable-length
|
|
|
|
lookbehind assertion it now points to the start of the assertion. Another
|
|
|
|
change is that when a callout appears before a group, the "length of next
|
|
|
|
pattern item" that is passed now just gives the length of the opening
|
|
|
|
parenthesis item, not the length of the whole group. A length of zero is now
|
|
|
|
given only for a callout at the end of the pattern. Automatic callouts are no
|
|
|
|
longer inserted before and after explicit callouts in the pattern.
|
|
|
|
|
|
|
|
4. Back references are now permitted in lookbehind assertions when there are
|
|
|
|
no duplicated group numbers (that is, (?| has not been used), and, if the
|
|
|
|
reference is by name, there is only one group of that name. The referenced
|
|
|
|
group must, of course be of fixed length.
|
|
|
|
|
|
|
|
5. pcre2test has been upgraded so that, when run under valgrind with valgrind
|
|
|
|
support enabled, reading past the end of the pattern is detected, both when
|
|
|
|
compiling and during callout processing.
|
|
|
|
|
|
|
|
6. \g{+<number>} (e.g. \g{+2)} ) is now supported. It is a "forward back
|
|
|
|
reference" and can be useful in repetitions (compare \g{-<number>}). Perl does
|
|
|
|
not recognize this syntax.
|
|
|
|
|
|
|
|
7. Automatic callouts are no longer generated before and after callouts in the
|
|
|
|
pattern.
|
|
|
|
|
2016-10-05 18:53:34 +02:00
|
|
|
8. When pcre2test was outputing information from a callout, the caret indicator
|
|
|
|
for the current position in the subject line was incorrect if it was after an
|
|
|
|
escape sequence for a character whose code point was greater than \x{ff}.
|
|
|
|
|
2016-10-05 19:03:52 +02:00
|
|
|
9. Change 19 for 10.22 had a typo (PCRE_STATIC_RUNTIME should be
|
|
|
|
PCRE2_STATIC_RUNTIME). Fix from David Gaussmann.
|
|
|
|
|
2016-10-11 18:40:09 +02:00
|
|
|
10. Added --max-buffer-size to pcre2grep, to allow for automatic buffer
|
|
|
|
expansion when long lines are encountered. Original patch by Dmitry
|
|
|
|
Cherniachenko.
|
|
|
|
|
2016-10-13 19:20:08 +02:00
|
|
|
11. If pcre2grep was compiled with JIT support, but the library was compiled
|
|
|
|
without it (something that neither ./configure nor CMake allow, but it can be
|
|
|
|
done by editing config.h), pcre2grep was giving a JIT error. Now it detects
|
|
|
|
this situation and does not try to use JIT.
|
|
|
|
|
2016-10-14 17:47:27 +02:00
|
|
|
12. Added some "const" qualifiers to variables in pcre2grep.
|
|
|
|
|
2016-10-14 18:17:48 +02:00
|
|
|
13. Added Dmitry Cherniachenko's patch for colouring output in Windows
|
|
|
|
(untested by me). Also, look for GREP_COLOUR or GREP_COLOR if the environment
|
|
|
|
variables PCRE2GREP_COLOUR and PCRE2GREP_COLOR are not found.
|
|
|
|
|
2016-10-16 18:48:14 +02:00
|
|
|
14. Add the -t (grand total) option to pcre2grep.
|
|
|
|
|
2016-10-18 13:22:40 +02:00
|
|
|
15. A number of bugs have been mended relating to match start-up optimizations
|
|
|
|
when the first thing in a pattern is a positive lookahead. These all applied
|
|
|
|
only when PCRE2_NO_START_OPTIMIZE was *not* set:
|
|
|
|
|
|
|
|
(a) A pattern such as (?=.*X)X$ was incorrectly optimized as if it needed
|
|
|
|
both an initial 'X' and a following 'X'.
|
|
|
|
(b) Some patterns starting with an assertion that started with .* were
|
|
|
|
incorrectly optimized as having to match at the start of the subject or
|
|
|
|
after a newline. There are cases where this is not true, for example,
|
|
|
|
(?=.*[A-Z])(?=.{8,16})(?!.*[\s]) matches after the start in lines that
|
|
|
|
start with spaces. Starting .* in an assertion is no longer taken as an
|
|
|
|
indication of matching at the start (or after a newline).
|
|
|
|
|
2016-08-03 11:01:02 +02:00
|
|
|
|
2016-07-27 20:00:12 +02:00
|
|
|
Version 10.22 29-July-2016
|
2016-06-29 18:43:32 +02:00
|
|
|
--------------------------
|
2016-01-29 16:01:17 +01:00
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
1. Applied Jason Hood's patches to RunTest.bat and testdata/wintestoutput3
|
2016-01-29 16:01:17 +01:00
|
|
|
to fix problems with running the tests under Windows.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
2. Implemented a facility for quoting literal characters within hexadecimal
|
|
|
|
patterns in pcre2test, to make it easier to create patterns with just a few
|
2016-01-29 19:16:59 +01:00
|
|
|
non-printing characters.
|
|
|
|
|
|
|
|
3. Binary zeros are not supported in pcre2test input files. It now detects them
|
|
|
|
and gives an error.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
4. Updated the valgrind parameters in RunTest: (a) changed smc-check=all to
|
|
|
|
smc-check=all-non-file; (b) changed obj:* in the suppression file to obj:??? so
|
2016-01-30 16:19:48 +01:00
|
|
|
that it matches only unknown objects.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
5. Updated the maintenance script maint/ManyConfigTests to make it easier to
|
2016-01-30 17:00:55 +01:00
|
|
|
select individual groups of tests.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
6. When the POSIX wrapper function regcomp() is called, the REG_NOSUB option
|
2016-01-31 20:14:15 +01:00
|
|
|
used to set PCRE2_NO_AUTO_CAPTURE when calling pcre2_compile(). However, this
|
|
|
|
disables the use of back references (and subroutine calls), which are supported
|
|
|
|
by other implementations of regcomp() with RE_NOSUB. Therefore, REG_NOSUB no
|
2016-06-29 18:52:05 +02:00
|
|
|
longer causes PCRE2_NO_AUTO_CAPTURE to be set, though it still ignores nmatch
|
2016-01-31 20:14:15 +01:00
|
|
|
and pmatch when regexec() is called.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
7. Because of 6 above, pcre2test has been modified with a new modifier called
|
|
|
|
posix_nosub, to call regcomp() with REG_NOSUB. Previously the no_auto_capture
|
|
|
|
modifier had this effect. That option is now ignored when the POSIX API is in
|
2016-01-31 20:14:15 +01:00
|
|
|
use.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
8. Minor tidies to the pcre2demo.c sample program, including more comments
|
2016-02-02 17:25:47 +01:00
|
|
|
about its 8-bit-ness.
|
|
|
|
|
2016-02-02 18:22:55 +01:00
|
|
|
9. Detect unmatched closing parentheses and give the error in the pre-scan
|
|
|
|
instead of later. Previously the pre-scan carried on and could give a
|
|
|
|
misleading incorrect error message. For example, /(?J)(?'a'))(?'a')/ gave a
|
|
|
|
message about invalid duplicate group names.
|
|
|
|
|
2016-02-03 16:22:01 +01:00
|
|
|
10. It has happened that pcre2test was accidentally linked with another POSIX
|
|
|
|
regex library instead of libpcre2-posix. In this situation, a call to regcomp()
|
|
|
|
(in the other library) may succeed, returning zero, but of course putting its
|
|
|
|
own data into the regex_t block. In one example the re_pcre2_code field was
|
|
|
|
left as NULL, which made pcre2test think it had not got a compiled POSIX regex,
|
|
|
|
so it treated the next line as another pattern line, resulting in a confusing
|
2016-06-29 18:52:05 +02:00
|
|
|
error message. A check has been added to pcre2test to see if the data returned
|
|
|
|
from a successful call of regcomp() are valid for PCRE2's regcomp(). If they
|
|
|
|
are not, an error message is output and the pcre2test run is abandoned. The
|
|
|
|
message points out the possibility of a mis-linking. Hopefully this will avoid
|
2016-02-03 16:22:01 +01:00
|
|
|
some head-scratching the next time this happens.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
11. A pattern such as /(?<=((?C)0))/, which has a callout inside a lookbehind
|
|
|
|
assertion, caused pcre2test to output a very large number of spaces when the
|
2016-02-06 17:40:59 +01:00
|
|
|
callout was taken, making the program appearing to loop.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
12. A pattern that included (*ACCEPT) in the middle of a sufficiently deeply
|
|
|
|
nested set of parentheses of sufficient size caused an overflow of the
|
2016-02-10 19:24:02 +01:00
|
|
|
compiling workspace (which was diagnosed, but of course is not desirable).
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
13. Detect missing closing parentheses during the pre-pass for group
|
2016-02-13 16:30:29 +01:00
|
|
|
identification.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
14. Changed some integer variable types and put in a number of casts, following
|
|
|
|
a report of compiler warnings from Visual Studio 2013 and a few tests with
|
2016-02-16 11:23:06 +01:00
|
|
|
gcc's -Wconversion (which still throws up a lot).
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
15. Implemented pcre2_code_copy(), and added pushcopy and #popcopy to pcre2test
|
2016-02-26 19:26:17 +01:00
|
|
|
for testing it.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
16. Change 66 for 10.21 introduced the use of snprintf() in PCRE2's version of
|
|
|
|
regerror(). When the error buffer is too small, my version of snprintf() puts a
|
|
|
|
binary zero in the final byte. Bug #1801 seems to show that other versions do
|
|
|
|
not do this, leading to bad output from pcre2test when it was checking for
|
|
|
|
buffer overflow. It no longer assumes a binary zero at the end of a too-small
|
2016-02-27 13:49:00 +01:00
|
|
|
regerror() buffer.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
17. Fixed typo ("&&" for "&") in pcre2_study(). Fortunately, this could not
|
2016-02-28 15:56:50 +01:00
|
|
|
actually affect anything, by sheer luck.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
18. Two minor fixes for MSVC compilation: (a) removal of apparently incorrect
|
|
|
|
"const" qualifiers in pcre2test and (b) defining snprintf as _snprintf for
|
|
|
|
older MSVC compilers. This has been done both in src/pcre2_internal.h for most
|
|
|
|
of the library, and also in src/pcre2posix.c, which no longer includes
|
2016-06-26 18:21:23 +02:00
|
|
|
pcre2_internal.h (see 24 below).
|
2016-02-29 19:31:30 +01:00
|
|
|
|
2016-06-24 11:07:15 +02:00
|
|
|
19. Applied Chris Wilson's patch (Bugzilla #1681) to CMakeLists.txt for MSVC
|
|
|
|
static compilation. Subsequently applied Chris Wilson's second patch, putting
|
2016-06-29 18:52:05 +02:00
|
|
|
the first patch under a new option instead of being unconditional when
|
2016-06-24 11:07:15 +02:00
|
|
|
PCRE_STATIC is set.
|
2016-03-01 13:02:58 +01:00
|
|
|
|
2016-04-01 11:15:38 +02:00
|
|
|
20. Updated pcre2grep to set stdout as binary when run under Windows, so as not
|
2016-06-29 18:52:05 +02:00
|
|
|
to convert \r\n at the ends of reflected lines into \r\r\n. This required
|
|
|
|
ensuring that other output that is written to stdout (e.g. file names) uses the
|
2016-04-01 11:15:38 +02:00
|
|
|
appropriate line terminator: \r\n for Windows, \n otherwise.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
21. When a line is too long for pcre2grep's internal buffer, show the maximum
|
2016-04-01 11:15:38 +02:00
|
|
|
length in the error message.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
22. Added support for string callouts to pcre2grep (Zoltan's patch with PH
|
2016-04-01 17:52:08 +02:00
|
|
|
additions).
|
|
|
|
|
2016-04-22 16:10:51 +02:00
|
|
|
23. RunTest.bat was missing a "set type" line for test 22.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
24. The pcre2posix.c file was including pcre2_internal.h, and using some
|
|
|
|
"private" knowledge of the data structures. This is unnecessary; the code has
|
2016-05-14 18:35:20 +02:00
|
|
|
been re-factored and no longer includes pcre2_internal.h.
|
|
|
|
|
2016-05-19 20:09:07 +02:00
|
|
|
25. A racing condition is fixed in JIT reported by Mozilla.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
26. Minor code refactor to avoid "array subscript is below array bounds"
|
2016-05-20 12:47:42 +02:00
|
|
|
compiler warning.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
27. Minor code refactor to avoid "left shift of negative number" warning.
|
2016-05-20 12:47:42 +02:00
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
28. Add a bit more sanity checking to pcre2_serialize_decode() and document
|
2016-05-24 18:37:13 +02:00
|
|
|
that it expects trusted data.
|
|
|
|
|
2016-05-25 10:42:31 +02:00
|
|
|
29. Fix typo in pcre2_jit_test.c
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
30. Due to an oversight, pcre2grep was not making use of JIT when available.
|
2016-05-31 13:06:53 +02:00
|
|
|
This is now fixed.
|
|
|
|
|
2016-05-31 13:36:10 +02:00
|
|
|
31. The RunGrepTest script is updated to use the valgrind suppressions file
|
2016-06-29 18:52:05 +02:00
|
|
|
when testing with JIT under valgrind (compare 10.21/51 below). The suppressions
|
2016-05-31 13:36:10 +02:00
|
|
|
file is updated so that is now the same as for PCRE1: it suppresses the
|
|
|
|
Memcheck warnings Addr16 and Cond in unknown objects (that is, JIT-compiled
|
2016-06-29 18:52:05 +02:00
|
|
|
code). Also changed smc-check=all to smc-check=all-non-file as was done for
|
2016-05-31 13:36:10 +02:00
|
|
|
RunTest (see 4 above).
|
|
|
|
|
2016-06-05 18:05:34 +02:00
|
|
|
32. Implemented the PCRE2_NO_JIT option for pcre2_match().
|
|
|
|
|
2016-06-14 11:19:24 +02:00
|
|
|
33. Fix typo that gave a compiler error when JIT not supported.
|
|
|
|
|
2016-06-14 17:12:07 +02:00
|
|
|
34. Fix comment describing the returns from find_fixedlength().
|
|
|
|
|
2016-06-14 18:14:52 +02:00
|
|
|
35. Fix potential negative index in pcre2test.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
36. Calls to pcre2_get_error_message() with error numbers that are never
|
2016-06-17 13:30:27 +02:00
|
|
|
returned by PCRE2 functions were returning empty strings. Now the error code
|
2016-06-29 18:52:05 +02:00
|
|
|
PCRE2_ERROR_BADDATA is returned. A facility has been added to pcre2test to
|
|
|
|
show the texts for given error numbers (i.e. to call pcre2_get_error_message()
|
|
|
|
and display what it returns) and a few representative error codes are now
|
2016-06-17 13:30:27 +02:00
|
|
|
checked in RunTest.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
37. Added "&& !defined(__INTEL_COMPILER)" to the test for __GNUC__ in
|
|
|
|
pcre2_match.c, in anticipation that this is needed for the same reason it was
|
2016-06-17 13:45:16 +02:00
|
|
|
recently added to pcrecpp.cc in PCRE1.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
38. Using -o with -M in pcre2grep could cause unnecessary repeated output when
|
|
|
|
the match extended over a line boundary, as it tried to find more matches "on
|
2016-06-17 19:37:26 +02:00
|
|
|
the same line" - but it was already over the end.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
39. Allow \C in lookbehinds and DFA matching in UTF-32 mode (by converting it
|
2016-06-20 20:14:51 +02:00
|
|
|
to the same code as '.' when PCRE2_DOTALL is set).
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
40. Fix two clang compiler warnings in pcre2test when only one code unit width
|
2016-06-22 12:41:05 +02:00
|
|
|
is supported.
|
|
|
|
|
2016-06-29 18:52:05 +02:00
|
|
|
41. Upgrade RunTest to automatically re-run test 2 with a large (64M) stack if
|
|
|
|
it fails when running the interpreter with a 16M stack (and if changing the
|
|
|
|
stack size via pcre2test is possible). This avoids having to manually set a
|
2016-06-22 21:23:33 +02:00
|
|
|
large stack size when testing with clang.
|
|
|
|
|
2016-07-01 10:56:59 +02:00
|
|
|
42. Fix register overwite in JIT when SSE2 acceleration is enabled.
|
|
|
|
|
2016-07-06 10:42:50 +02:00
|
|
|
43. Detect integer overflow in pcre2test pattern and data repetition counts.
|
|
|
|
|
2016-07-06 17:02:24 +02:00
|
|
|
44. In pcre2test, ignore "allcaptures" after DFA matching.
|
|
|
|
|
2016-07-15 12:02:19 +02:00
|
|
|
45. Fix unaligned accesses on x86. Patch by Marc Mutz.
|
|
|
|
|
2016-07-27 20:00:12 +02:00
|
|
|
46. Fix some more clang compiler warnings.
|
|
|
|
|
2016-01-29 16:01:17 +01:00
|
|
|
|
2016-01-12 15:44:34 +01:00
|
|
|
Version 10.21 12-January-2016
|
|
|
|
-----------------------------
|
2015-07-03 08:46:20 +02:00
|
|
|
|
|
|
|
1. Improve matching speed of patterns starting with + or * in JIT.
|
|
|
|
|
2015-07-06 18:05:41 +02:00
|
|
|
2. Use memchr() to find the first character in an unanchored match in 8-bit
|
|
|
|
mode in the interpreter. This gives a significant speed improvement.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
3. Removed a redundant copy of the opcode_possessify table in the
|
2015-07-06 18:07:54 +02:00
|
|
|
pcre2_auto_possessify.c source.
|
|
|
|
|
2015-07-08 10:30:23 +02:00
|
|
|
4. Fix typos in dftables.c for z/OS.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
5. Change 36 for 10.20 broke the handling of [[:>:]] and [[:<:]] in that
|
|
|
|
processing them could involve a buffer overflow if the following character was
|
2015-07-15 11:08:12 +02:00
|
|
|
an opening parenthesis.
|
|
|
|
|
2015-07-15 11:34:04 +02:00
|
|
|
6. Change 36 for 10.20 also introduced a bug in processing this pattern:
|
2015-11-03 20:14:31 +01:00
|
|
|
/((?x)(*:0))#(?'/. Specifically: if a setting of (?x) was followed by a (*MARK)
|
|
|
|
setting (which (*:0) is), then (?x) did not get unset at the end of its group
|
2015-07-15 11:34:04 +02:00
|
|
|
during the scan for named groups, and hence the external # was incorrectly
|
2015-07-16 18:15:52 +02:00
|
|
|
treated as a comment and the invalid (?' at the end of the pattern was not
|
|
|
|
diagnosed. This caused a buffer overflow during the real compile. This bug was
|
|
|
|
discovered by Karl Skomski with the LLVM fuzzer.
|
2015-07-15 11:34:04 +02:00
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
7. Moved the pcre2_find_bracket() function from src/pcre2_compile.c into its
|
|
|
|
own source module to avoid a circular dependency between src/pcre2_compile.c
|
2015-07-16 18:11:52 +02:00
|
|
|
and src/pcre2_study.c
|
|
|
|
|
2015-07-16 19:47:20 +02:00
|
|
|
8. A callout with a string argument containing an opening square bracket, for
|
|
|
|
example /(?C$[$)(?<]/, was incorrectly processed and could provoke a buffer
|
|
|
|
overflow. This bug was discovered by Karl Skomski with the LLVM fuzzer.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
9. The handling of callouts during the pre-pass for named group identification
|
2015-07-16 19:47:20 +02:00
|
|
|
has been tightened up.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
10. The quantifier {1} can be ignored, whether greedy, non-greedy, or
|
2015-07-17 15:41:09 +02:00
|
|
|
possessive. This is a very minor optimization.
|
|
|
|
|
2015-07-17 17:11:45 +02:00
|
|
|
11. A possessively repeated conditional group that could match an empty string,
|
|
|
|
for example, /(?(R))*+/, was incorrectly compiled.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
12. The Unicode tables have been updated to Unicode 8.0.0 (thanks to Christian
|
2015-07-17 17:44:51 +02:00
|
|
|
Persch).
|
|
|
|
|
2015-07-17 18:25:21 +02:00
|
|
|
13. An empty comment (?#) in a pattern was incorrectly processed and could
|
|
|
|
provoke a buffer overflow. This bug was discovered by Karl Skomski with the
|
|
|
|
LLVM fuzzer.
|
|
|
|
|
2015-07-20 09:38:06 +02:00
|
|
|
14. Fix infinite recursion in the JIT compiler when certain patterns such as
|
|
|
|
/(?:|a|){100}x/ are analysed.
|
|
|
|
|
2015-07-20 12:17:23 +02:00
|
|
|
15. Some patterns with character classes involving [: and \\ were incorrectly
|
|
|
|
compiled and could cause reading from uninitialized memory or an incorrect
|
|
|
|
error diagnosis. Examples are: /[[:\\](?<[::]/ and /[[:\\](?'abc')[a:]. The
|
|
|
|
first of these bugs was discovered by Karl Skomski with the LLVM fuzzer.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
16. Pathological patterns containing many nested occurrences of [: caused
|
|
|
|
pcre2_compile() to run for a very long time. This bug was found by the LLVM
|
2015-07-21 15:42:14 +02:00
|
|
|
fuzzer.
|
|
|
|
|
2015-07-21 16:03:08 +02:00
|
|
|
17. A missing closing parenthesis for a callout with a string argument was not
|
|
|
|
being diagnosed, possibly leading to a buffer overflow. This bug was found by
|
|
|
|
the LLVM fuzzer.
|
2015-07-20 12:17:23 +02:00
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
18. A conditional group with only one branch has an implicit empty alternative
|
2015-07-22 11:01:50 +02:00
|
|
|
branch and must therefore be treated as potentially matching an empty string.
|
|
|
|
|
2015-07-22 11:29:09 +02:00
|
|
|
19. If (?R was followed by - or + incorrect behaviour happened instead of a
|
|
|
|
diagnostic. This bug was discovered by Karl Skomski with the LLVM fuzzer.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
20. Another bug that was introduced by change 36 for 10.20: conditional groups
|
|
|
|
whose condition was an assertion preceded by an explicit callout with a string
|
2015-07-22 16:34:31 +02:00
|
|
|
argument might be incorrectly processed, especially if the string contained \Q.
|
|
|
|
This bug was discovered by Karl Skomski with the LLVM fuzzer.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
21. Compiling PCRE2 with the sanitize options of clang showed up a number of
|
|
|
|
very pedantic coding infelicities and a buffer overflow while checking a UTF-8
|
2015-07-24 15:30:50 +02:00
|
|
|
string if the final multi-byte UTF-8 character was truncated.
|
|
|
|
|
2015-07-24 20:18:05 +02:00
|
|
|
22. For Perl compatibility in EBCDIC environments, ranges such as a-z in a
|
2015-11-03 20:14:31 +01:00
|
|
|
class, where both values are literal letters in the same case, omit the
|
2015-07-24 20:18:05 +02:00
|
|
|
non-letter EBCDIC code points within the range.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
23. Finding the minimum matching length of complex patterns with back
|
|
|
|
references and/or recursions can take a long time. There is now a cut-off that
|
|
|
|
gives up trying to find a minimum length when things get too complex.
|
2015-08-01 11:11:28 +02:00
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
24. An optimization has been added that speeds up finding the minimum matching
|
2015-08-01 11:11:28 +02:00
|
|
|
length for patterns containing repeated capturing groups or recursions.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
25. If a pattern contained a back reference to a group whose number was
|
|
|
|
duplicated as a result of appearing in a (?|...) group, the computation of the
|
2015-08-03 15:18:49 +02:00
|
|
|
minimum matching length gave a wrong result, which could cause incorrect "no
|
2015-11-03 20:14:31 +01:00
|
|
|
match" errors. For such patterns, a minimum matching length cannot at present
|
2015-08-03 15:18:49 +02:00
|
|
|
be computed.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
26. Added a check for integer overflow in conditions (?(<digits>) and
|
2015-08-04 11:13:11 +02:00
|
|
|
(?(R<digits>). This omission was discovered by Karl Skomski with the LLVM
|
|
|
|
fuzzer.
|
|
|
|
|
2015-08-05 11:04:01 +02:00
|
|
|
27. Fixed an issue when \p{Any} inside an xclass did not read the current
|
|
|
|
character.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
28. If pcre2grep was given the -q option with -c or -l, or when handling a
|
2015-08-05 19:35:36 +02:00
|
|
|
binary file, it incorrectly wrote output to stdout.
|
|
|
|
|
2015-08-08 07:45:17 +02:00
|
|
|
29. The JIT compiler did not restore the control verb head in case of *THEN
|
|
|
|
control verbs. This issue was found by Karl Skomski with a custom LLVM fuzzer.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
30. The way recursive references such as (?3) are compiled has been re-written
|
|
|
|
because the old way was the cause of many issues. Now, conversion of the group
|
|
|
|
number into a pattern offset does not happen until the pattern has been
|
2015-08-09 18:29:35 +02:00
|
|
|
completely compiled. This does mean that detection of all infinitely looping
|
2015-11-03 20:14:31 +01:00
|
|
|
recursions is postponed till match time. In the past, some easy ones were
|
|
|
|
detected at compile time. This re-writing was done in response to yet another
|
2015-08-09 18:29:35 +02:00
|
|
|
bug found by the LLVM fuzzer.
|
|
|
|
|
2015-08-09 19:46:35 +02:00
|
|
|
31. A test for a back reference to a non-existent group was missing for items
|
2015-11-03 20:14:31 +01:00
|
|
|
such as \987. This caused incorrect code to be compiled. This issue was found
|
2015-08-09 19:46:35 +02:00
|
|
|
by Karl Skomski with a custom LLVM fuzzer.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
32. Error messages for syntax errors following \g and \k were giving inaccurate
|
2015-08-09 19:46:35 +02:00
|
|
|
offsets in the pattern.
|
|
|
|
|
2015-08-10 14:28:27 +02:00
|
|
|
33. Improve the performance of starting single character repetitions in JIT.
|
|
|
|
|
2015-08-10 18:34:17 +02:00
|
|
|
34. (*LIMIT_MATCH=) now gives an error instead of setting the value to 0.
|
|
|
|
|
|
|
|
35. Error messages for syntax errors in *LIMIT_MATCH and *LIMIT_RECURSION now
|
|
|
|
give the right offset instead of zero.
|
|
|
|
|
2015-08-11 07:30:10 +02:00
|
|
|
36. The JIT compiler should not check repeats after a {0,1} repeat byte code.
|
|
|
|
This issue was found by Karl Skomski with a custom LLVM fuzzer.
|
|
|
|
|
2015-08-11 15:20:37 +02:00
|
|
|
37. The JIT compiler should restore the control chain for empty possessive
|
|
|
|
repeats. This issue was found by Karl Skomski with a custom LLVM fuzzer.
|
|
|
|
|
2015-08-13 13:35:38 +02:00
|
|
|
38. A bug which was introduced by the single character repetition optimization
|
|
|
|
was fixed.
|
|
|
|
|
2015-08-14 11:36:04 +02:00
|
|
|
39. Match limit check added to recursion. This issue was found by Karl Skomski
|
|
|
|
with a custom LLVM fuzzer.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
40. Arrange for the UTF check in pcre2_match() and pcre2_dfa_match() to look
|
|
|
|
only at the part of the subject that is relevant when the starting offset is
|
2015-08-18 12:34:05 +02:00
|
|
|
non-zero.
|
|
|
|
|
2015-08-23 03:54:04 +02:00
|
|
|
41. Improve first character match in JIT with SSE2 on x86.
|
|
|
|
|
2015-08-24 11:25:04 +02:00
|
|
|
42. Fix two assertion fails in JIT. These issues were found by Karl Skomski
|
|
|
|
with a custom LLVM fuzzer.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
43. Correct the setting of CMAKE_C_FLAGS in CMakeLists.txt (patch from Roy Ivy
|
2015-08-24 18:04:32 +02:00
|
|
|
III).
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
44. Fix bug in RunTest.bat for new test 14, and adjust the script for the added
|
2015-08-24 18:31:30 +02:00
|
|
|
test (there are now 20 in total).
|
2015-08-24 18:09:39 +02:00
|
|
|
|
2015-08-26 15:35:58 +02:00
|
|
|
45. Fixed a corner case of range optimization in JIT.
|
|
|
|
|
2015-08-29 19:13:09 +02:00
|
|
|
46. Add the ${*MARK} facility to pcre2_substitute().
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
47. Modifier lists in pcre2test were splitting at spaces without the required
|
2015-08-30 16:11:15 +02:00
|
|
|
commas.
|
|
|
|
|
2015-08-30 19:47:36 +02:00
|
|
|
48. Implemented PCRE2_ALT_VERBNAMES.
|
|
|
|
|
2015-09-02 10:35:50 +02:00
|
|
|
49. Fixed two issues in JIT. These were found by Karl Skomski with a custom
|
|
|
|
LLVM fuzzer.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
50. The pcre2test program has been extended by adding the #newline_default
|
|
|
|
command. This has made it possible to run the standard tests when PCRE2 is
|
|
|
|
compiled with either CR or CRLF as the default newline convention. As part of
|
|
|
|
this work, the new command was added to several test files and the testing
|
|
|
|
scripts were modified. The pcre2grep tests can now also be run when there is no
|
2015-09-08 19:01:17 +02:00
|
|
|
LF in the default newline convention.
|
|
|
|
|
2015-09-11 18:56:47 +02:00
|
|
|
51. The RunTest script has been modified so that, when JIT is used and valgrind
|
|
|
|
is specified, a valgrind suppressions file is set up to ignore "Invalid read of
|
|
|
|
size 16" errors because these are false positives when the hardware supports
|
|
|
|
the SSE2 instruction set.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
52. It is now possible to have comment lines amid the subject strings in
|
2015-09-14 17:10:19 +02:00
|
|
|
pcre2test (and perltest.sh) input.
|
|
|
|
|
2015-09-22 13:24:28 +02:00
|
|
|
53. Implemented PCRE2_USE_OFFSET_LIMIT and pcre2_set_offset_limit().
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
54. Add the null_context modifier to pcre2test so that calling pcre2_compile()
|
2015-09-23 13:49:03 +02:00
|
|
|
and the matching functions with NULL contexts can be tested.
|
|
|
|
|
2015-10-07 19:32:48 +02:00
|
|
|
55. Implemented PCRE2_SUBSTITUTE_EXTENDED.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
56. In a character class such as [\W\p{Any}] where both a negative-type escape
|
|
|
|
("not a word character") and a property escape were present, the property
|
2015-10-09 18:06:53 +02:00
|
|
|
escape was being ignored.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
57. Fixed integer overflow for patterns whose minimum matching length is very,
|
2015-10-09 18:54:29 +02:00
|
|
|
very large.
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
58. Implemented --never-backslash-C.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
59. Change 55 above introduced a bug by which certain patterns provoked the
|
2015-10-17 20:29:01 +02:00
|
|
|
erroneous error "\ at end of pattern".
|
|
|
|
|
2015-10-21 17:59:45 +02:00
|
|
|
60. The special sequences [[:<:]] and [[:>:]] gave rise to incorrect compiling
|
|
|
|
errors or other strange effects if compiled in UCP mode. Found with libFuzzer
|
|
|
|
and AddressSanitizer.
|
2015-10-21 13:29:07 +02:00
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
61. Whitespace at the end of a pcre2test pattern line caused a spurious error
|
2015-10-22 17:49:54 +02:00
|
|
|
message if there were only single-character modifiers. It should be ignored.
|
|
|
|
|
2015-10-25 18:35:34 +01:00
|
|
|
62. The use of PCRE2_NO_AUTO_CAPTURE could cause incorrect compilation results
|
|
|
|
or segmentation errors for some patterns. Found with libFuzzer and
|
|
|
|
AddressSanitizer.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
63. Very long names in (*MARK) or (*THEN) etc. items could provoke a buffer
|
2015-10-28 10:25:31 +01:00
|
|
|
overflow.
|
|
|
|
|
2015-10-28 10:59:53 +01:00
|
|
|
64. Improve error message for overly-complicated patterns.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
65. Implemented an optional replication feature for patterns in pcre2test, to
|
|
|
|
make it easier to test long repetitive patterns. The tests for 63 above are
|
2015-10-30 16:20:07 +01:00
|
|
|
converted to use the new feature.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
66. In the POSIX wrapper, if regerror() was given too small a buffer, it could
|
2015-10-30 18:17:40 +01:00
|
|
|
misbehave.
|
|
|
|
|
2015-10-30 18:30:03 +01:00
|
|
|
67. In pcre2_substitute() in UTF mode, the UTF validity check on the
|
|
|
|
replacement string was happening before the length setting when the replacement
|
|
|
|
string was zero-terminated.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
68. In pcre2_substitute() in UTF mode, PCRE2_NO_UTF_CHECK can be set for the
|
2015-10-30 18:41:56 +01:00
|
|
|
second and subsequent calls to pcre2_match().
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
69. There was no check for integer overflow for a replacement group number in
|
|
|
|
pcre2_substitute(). An added check for a number greater than the largest group
|
2015-10-30 19:25:19 +01:00
|
|
|
number in the pattern means this is not now needed.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
70. The PCRE2-specific VERSION condition didn't work correctly if only one
|
|
|
|
digit was given after the decimal point, or if more than two digits were given.
|
|
|
|
It now works with one or two digits, and gives a compile time error if more are
|
2015-11-01 17:28:13 +01:00
|
|
|
given.
|
|
|
|
|
2015-11-03 20:14:31 +01:00
|
|
|
71. In pcre2_substitute() there was the possibility of reading one code unit
|
2015-11-01 17:36:20 +01:00
|
|
|
beyond the end of the replacement string.
|
|
|
|
|
2015-11-01 17:54:17 +01:00
|
|
|
72. The code for checking a subject's UTF-32 validity for a pattern with a
|
2015-11-03 20:14:31 +01:00
|
|
|
lookbehind involved an out-of-bounds pointer, which could potentially cause
|
2015-11-01 17:54:17 +01:00
|
|
|
trouble in some environments.
|
|
|
|
|
2015-11-01 18:31:48 +01:00
|
|
|
73. The maximum lookbehind length was incorrectly calculated for patterns such
|
|
|
|
as /(?<=(a)(?-1))x/ which have a recursion within a backreference.
|
|
|
|
|
2015-11-03 11:39:27 +01:00
|
|
|
74. Give an error if a lookbehind assertion is longer than 65535 code units.
|
|
|
|
|
2015-11-03 18:38:00 +01:00
|
|
|
75. Give an error in pcre2_substitute() if a match ends before it starts (as a
|
|
|
|
result of the use of \K).
|
|
|
|
|
2015-11-03 21:04:23 +01:00
|
|
|
76. Check the length of subpattern names and the names in (*MARK:xx) etc.
|
|
|
|
dynamically to avoid the possibility of integer overflow.
|
2015-11-03 20:14:31 +01:00
|
|
|
|
2015-11-05 18:33:39 +01:00
|
|
|
77. Implement pcre2_set_max_pattern_length() so that programs can restrict the
|
|
|
|
size of patterns that they are prepared to handle.
|
|
|
|
|
2015-11-05 19:03:16 +01:00
|
|
|
78. (*NO_AUTO_POSSESS) was not working.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
79. Adding group information caching improves the speed of compiling when
|
|
|
|
checking whether a group has a fixed length and/or could match an empty string,
|
|
|
|
especially when recursion or subroutine calls are involved. However, this
|
|
|
|
cannot be used when (?| is present in the pattern because the same number may
|
|
|
|
be used for groups of different sizes. To catch runaway patterns in this
|
|
|
|
situation, counts have been introduced to the functions that scan for empty
|
2015-11-10 15:33:28 +01:00
|
|
|
branches or compute fixed lengths.
|
2015-11-08 15:20:09 +01:00
|
|
|
|
2015-11-09 18:39:43 +01:00
|
|
|
80. Allow for the possibility of the size of the nest_save structure not being
|
|
|
|
a factor of the size of the compiling workspace (it currently is).
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
81. Check for integer overflow in minimum length calculation and cap it at
|
2015-11-09 19:45:15 +01:00
|
|
|
65535.
|
|
|
|
|
2015-11-11 10:42:26 +01:00
|
|
|
82. Small optimizations in code for finding the minimum matching length.
|
|
|
|
|
2015-11-11 18:43:37 +01:00
|
|
|
83. Lock out configuring for EBCDIC with non-8-bit libraries.
|
|
|
|
|
2015-11-11 18:52:11 +01:00
|
|
|
84. Test for error code <= 0 in regerror().
|
|
|
|
|
2015-11-11 19:35:14 +01:00
|
|
|
85. Check for too many replacements (more than INT_MAX) in pcre2_substitute().
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
86. Avoid the possibility of computing with an out-of-bounds pointer (though
|
2015-11-12 18:24:58 +01:00
|
|
|
not dereferencing it) while handling lookbehind assertions.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
87. Failure to get memory for the match data in regcomp() is now given as a
|
2015-11-12 19:35:49 +01:00
|
|
|
regcomp() error instead of waiting for regexec() to pick it up.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
88. In pcre2_substitute(), ensure that CRLF is not split when it is a valid
|
2015-11-13 17:52:26 +01:00
|
|
|
newline sequence.
|
|
|
|
|
2015-11-13 18:26:42 +01:00
|
|
|
89. Paranoid check in regcomp() for bad error code from pcre2_compile().
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
90. Run test 8 (internal offsets and code sizes) for link sizes 3 and 4 as well
|
2015-11-14 14:22:34 +01:00
|
|
|
as for link size 2.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
91. Document that JIT has a limit on pattern size, and give more information
|
2015-11-14 17:48:32 +01:00
|
|
|
about JIT compile failures in pcre2test.
|
|
|
|
|
2015-11-14 18:28:19 +01:00
|
|
|
92. Implement PCRE2_INFO_HASBACKSLASHC.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
93. Re-arrange valgrind support code in pcre2test to avoid spurious reports
|
2015-11-15 19:55:20 +01:00
|
|
|
with JIT (possibly caused by SSE2?).
|
|
|
|
|
2015-11-16 09:30:48 +01:00
|
|
|
94. Support offset_limit in JIT.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
95. A sequence such as [[:punct:]b] that is, a POSIX character class followed
|
|
|
|
by a single ASCII character in a class item, was incorrectly compiled in UCP
|
2015-11-17 18:13:43 +01:00
|
|
|
mode. The POSIX class got lost, but only if the single character followed it.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
96. [:punct:] in UCP mode was matching some characters in the range 128-255
|
2015-11-17 18:59:35 +01:00
|
|
|
that should not have been matched.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
97. If [:^ascii:] or [:^xdigit:] are present in a non-negated class, all
|
|
|
|
characters with code points greater than 255 are in the class. When a Unicode
|
|
|
|
property was also in the class (if PCRE2_UCP is set, escapes such as \w are
|
|
|
|
turned into Unicode properties), wide characters were not correctly handled,
|
2015-11-20 17:55:36 +01:00
|
|
|
and could fail to match.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
98. In pcre2test, make the "startoffset" modifier a synonym of "offset",
|
2015-11-21 17:10:24 +01:00
|
|
|
because it sets the "startoffset" parameter for pcre2_match().
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
99. If PCRE2_AUTO_CALLOUT was set on a pattern that had a (?# comment between
|
|
|
|
an item and its qualifier (for example, A(?#comment)?B) pcre2_compile()
|
2015-11-27 16:58:44 +01:00
|
|
|
misbehaved. This bug was found by the LLVM fuzzer.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
100. The error for an invalid UTF pattern string always gave the code unit
|
2015-11-27 16:58:44 +01:00
|
|
|
offset as zero instead of where the invalidity was found.
|
2015-11-25 19:46:35 +01:00
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
101. Further to 97 above, negated classes such as [^[:^ascii:]\d] were also not
|
2015-11-27 18:03:58 +01:00
|
|
|
working correctly in UCP mode.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
102. Similar to 99 above, if an isolated \E was present between an item and its
|
2015-11-27 18:34:36 +01:00
|
|
|
qualifier when PCRE2_AUTO_CALLOUT was set, pcre2_compile() misbehaved. This bug
|
|
|
|
was found by the LLVM fuzzer.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
103. The POSIX wrapper function regexec() crashed if the option REG_STARTEND
|
2015-11-29 18:38:12 +01:00
|
|
|
was set when the pmatch argument was NULL. It now returns REG_INVARG.
|
|
|
|
|
2015-11-29 18:45:27 +01:00
|
|
|
104. Allow for up to 32-bit numbers in the ordin() function in pcre2grep.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
105. An empty \Q\E sequence between an item and its qualifier caused
|
2015-11-30 18:31:16 +01:00
|
|
|
pcre2_compile() to misbehave when auto callouts were enabled. This bug
|
|
|
|
was found by the LLVM fuzzer.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
106. If both PCRE2_ALT_VERBNAMES and PCRE2_EXTENDED were set, and a (*MARK) or
|
|
|
|
other verb "name" ended with whitespace immediately before the closing
|
|
|
|
parenthesis, pcre2_compile() misbehaved. Example: /(*:abc )/, but only when
|
2015-12-01 18:41:24 +01:00
|
|
|
both those options were set.
|
|
|
|
|
2015-12-02 18:39:26 +01:00
|
|
|
107. In a number of places pcre2_compile() was not handling NULL characters
|
|
|
|
correctly, and pcre2test with the "bincode" modifier was not always correctly
|
|
|
|
displaying fields containing NULLS:
|
|
|
|
|
|
|
|
(a) Within /x extended #-comments
|
2015-12-17 19:44:06 +01:00
|
|
|
(b) Within the "name" part of (*MARK) and other *verbs
|
|
|
|
(c) Within the text argument of a callout
|
|
|
|
|
|
|
|
108. If a pattern that was compiled with PCRE2_EXTENDED started with white
|
|
|
|
space or a #-type comment that was followed by (?-x), which turns off
|
2015-12-03 17:58:31 +01:00
|
|
|
PCRE2_EXTENDED, and there was no subsequent (?x) to turn it on again,
|
|
|
|
pcre2_compile() assumed that (?-x) applied to the whole pattern and
|
2015-12-17 19:44:06 +01:00
|
|
|
consequently mis-compiled it. This bug was found by the LLVM fuzzer. The fix
|
2016-02-27 13:49:00 +01:00
|
|
|
for this bug means that a setting of any of the (?imsxJU) options at the start
|
2015-12-17 19:44:06 +01:00
|
|
|
of a pattern is no longer transferred to the options that are returned by
|
|
|
|
PCRE2_INFO_ALLOPTIONS. In fact, this was an anachronism that should have
|
2015-12-03 18:19:13 +01:00
|
|
|
changed when the effects of those options were all moved to compile time.
|
2015-12-02 18:39:26 +01:00
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
109. An escaped closing parenthesis in the "name" part of a (*verb) when
|
2015-12-03 19:36:36 +01:00
|
|
|
PCRE2_ALT_VERBNAMES was set caused pcre2_compile() to malfunction. This bug
|
|
|
|
was found by the LLVM fuzzer.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
110. Implemented PCRE2_SUBSTITUTE_UNSET_EMPTY, and updated pcre2test to make it
|
2015-12-04 19:39:08 +01:00
|
|
|
possible to test it.
|
|
|
|
|
2015-12-17 19:44:06 +01:00
|
|
|
111. "Harden" pcre2test against ridiculously large values in modifiers and
|
2015-12-05 19:17:41 +01:00
|
|
|
command line arguments.
|
|
|
|
|
2015-12-12 19:45:40 +01:00
|
|
|
112. Implemented PCRE2_SUBSTITUTE_UNKNOWN_UNSET and PCRE2_SUBSTITUTE_OVERFLOW_
|
|
|
|
LENGTH.
|
|
|
|
|
2015-12-16 19:44:24 +01:00
|
|
|
113. Fix printing of *MARK names that contain binary zeroes in pcre2test.
|
|
|
|
|
2015-07-03 08:46:20 +02:00
|
|
|
|
2015-06-30 12:28:59 +02:00
|
|
|
Version 10.20 30-June-2015
|
2015-06-18 18:39:25 +02:00
|
|
|
--------------------------
|
2015-03-11 18:44:16 +01:00
|
|
|
|
|
|
|
1. Callouts with string arguments have been added.
|
|
|
|
|
2015-03-12 12:49:29 +01:00
|
|
|
2. Assertion code generator in JIT has been optimized.
|
|
|
|
|
2015-03-20 13:37:28 +01:00
|
|
|
3. The invalid pattern (?(?C) has a missing assertion condition at the end. The
|
|
|
|
pcre2_compile() function read past the end of the input before diagnosing an
|
2015-03-23 16:52:08 +01:00
|
|
|
error. This bug was discovered by the LLVM fuzzer.
|
|
|
|
|
|
|
|
4. Implemented pcre2_callout_enumerate().
|
2015-03-20 13:37:28 +01:00
|
|
|
|
2015-03-24 11:21:34 +01:00
|
|
|
5. Fix JIT compilation of conditional blocks whose assertion is converted to
|
|
|
|
(*FAIL). E.g: /(?(?!))/.
|
|
|
|
|
|
|
|
6. The pattern /(?(?!)^)/ caused references to random memory. This bug was
|
|
|
|
discovered by the LLVM fuzzer.
|
|
|
|
|
|
|
|
7. The assertion (?!) is optimized to (*FAIL). This was not handled correctly
|
|
|
|
when this assertion was used as a condition, for example (?(?!)a|b). In
|
|
|
|
pcre2_match() it worked by luck; in pcre2_dfa_match() it gave an incorrect
|
|
|
|
error about an unsupported item.
|
2015-03-24 09:43:52 +01:00
|
|
|
|
2015-03-25 18:01:04 +01:00
|
|
|
8. For some types of pattern, for example /Z*(|d*){216}/, the auto-
|
2015-05-15 19:09:01 +02:00
|
|
|
possessification code could take exponential time to complete. A recursion
|
|
|
|
depth limit of 1000 has been imposed to limit the resources used by this
|
2015-03-25 18:01:04 +01:00
|
|
|
optimization. This infelicity was discovered by the LLVM fuzzer.
|
|
|
|
|
2015-05-15 19:09:01 +02:00
|
|
|
9. A pattern such as /(*UTF)[\S\V\H]/, which contains a negated special class
|
|
|
|
such as \S in non-UCP mode, explicit wide characters (> 255) can be ignored
|
2015-03-25 20:26:27 +01:00
|
|
|
because \S ensures they are all in the class. The code for doing this was
|
|
|
|
interacting badly with the code for computing the amount of space needed to
|
|
|
|
compile the pattern, leading to a buffer overflow. This bug was discovered by
|
|
|
|
the LLVM fuzzer.
|
|
|
|
|
2015-03-27 18:45:02 +01:00
|
|
|
10. A pattern such as /((?2)+)((?1))/ which has mutual recursion nested inside
|
|
|
|
other kinds of group caused stack overflow at compile time. This bug was
|
|
|
|
discovered by the LLVM fuzzer.
|
|
|
|
|
2015-03-29 13:15:32 +02:00
|
|
|
11. A pattern such as /(?1)(?#?'){8}(a)/ which had a parenthesized comment
|
|
|
|
between a subroutine call and its quantifier was incorrectly compiled, leading
|
|
|
|
to buffer overflow or other errors. This bug was discovered by the LLVM fuzzer.
|
|
|
|
|
2015-05-15 19:09:01 +02:00
|
|
|
12. The illegal pattern /(?(?<E>.*!.*)?)/ was not being diagnosed as missing an
|
|
|
|
assertion after (?(. The code was failing to check the character after (?(?<
|
2015-03-29 17:40:45 +02:00
|
|
|
for the ! or = that would indicate a lookbehind assertion. This bug was
|
|
|
|
discovered by the LLVM fuzzer.
|
|
|
|
|
2015-05-15 19:09:01 +02:00
|
|
|
13. A pattern such as /X((?2)()*+){2}+/ which has a possessive quantifier with
|
|
|
|
a fixed maximum following a group that contains a subroutine reference was
|
|
|
|
incorrectly compiled and could trigger buffer overflow. This bug was discovered
|
2015-03-29 19:34:04 +02:00
|
|
|
by the LLVM fuzzer.
|
|
|
|
|
2015-05-15 19:09:01 +02:00
|
|
|
14. Negative relative recursive references such as (?-7) to non-existent
|
|
|
|
subpatterns were not being diagnosed and could lead to unpredictable behaviour.
|
2015-03-31 17:01:25 +02:00
|
|
|
This bug was discovered by the LLVM fuzzer.
|
|
|
|
|
2015-05-15 19:09:01 +02:00
|
|
|
15. The bug fixed in 14 was due to an integer variable that was unsigned when
|
2015-03-31 18:10:01 +02:00
|
|
|
it should have been signed. Some other "int" variables, having been checked,
|
|
|
|
have either been changed to uint32_t or commented as "must be signed".
|
|
|
|
|
2015-04-01 17:37:54 +02:00
|
|
|
16. A mutual recursion within a lookbehind assertion such as (?<=((?2))((?1)))
|
|
|
|
caused a stack overflow instead of the diagnosis of a non-fixed length
|
|
|
|
lookbehind assertion. This bug was discovered by the LLVM fuzzer.
|
|
|
|
|
2015-04-03 13:14:19 +02:00
|
|
|
17. The use of \K in a positive lookbehind assertion in a non-anchored pattern
|
|
|
|
(e.g. /(?<=\Ka)/) could make pcre2grep loop.
|
|
|
|
|
2015-04-06 14:16:36 +02:00
|
|
|
18. There was a similar problem to 17 in pcre2test for global matches, though
|
|
|
|
the code there did catch the loop.
|
|
|
|
|
2015-05-15 19:09:01 +02:00
|
|
|
19. If a greedy quantified \X was preceded by \C in UTF mode (e.g. \C\X*),
|
2015-04-08 18:53:22 +02:00
|
|
|
and a subsequent item in the pattern caused a non-match, backtracking over the
|
|
|
|
repeated \X did not stop, but carried on past the start of the subject, causing
|
|
|
|
reference to random memory and/or a segfault. There were also some other cases
|
|
|
|
where backtracking after \C could crash. This set of bugs was discovered by the
|
2015-04-08 18:33:58 +02:00
|
|
|
LLVM fuzzer.
|
|
|
|
|
2015-05-15 19:09:01 +02:00
|
|
|
20. The function for finding the minimum length of a matching string could take
|
|
|
|
a very long time if mutual recursion was present many times in a pattern, for
|
|
|
|
example, /((?2){73}(?2))((?1))/. A better mutual recursion detection method has
|
2015-04-13 11:13:39 +02:00
|
|
|
been implemented. This infelicity was discovered by the LLVM fuzzer.
|
|
|
|
|
2015-04-13 19:29:05 +02:00
|
|
|
21. Implemented PCRE2_NEVER_BACKSLASH_C.
|
|
|
|
|
2015-05-15 19:09:01 +02:00
|
|
|
22. The feature for string replication in pcre2test could read from freed
|
2015-04-21 10:34:10 +02:00
|
|
|
memory if the replication required a buffer to be extended, and it was not
|
2015-05-15 19:09:01 +02:00
|
|
|
working properly in 16-bit and 32-bit modes. This issue was discovered by a
|
2015-04-21 10:34:10 +02:00
|
|
|
fuzzer: see http://lcamtuf.coredump.cx/afl/.
|
|
|
|
|
2015-04-22 19:39:25 +02:00
|
|
|
23. Added the PCRE2_ALT_CIRCUMFLEX option.
|
|
|
|
|
2015-05-15 19:09:01 +02:00
|
|
|
24. Adjust the treatment of \8 and \9 to be the same as the current Perl
|
2015-04-23 19:28:39 +02:00
|
|
|
behaviour.
|
|
|
|
|
2015-04-23 19:38:02 +02:00
|
|
|
25. Static linking against the PCRE2 library using the pkg-config module was
|
|
|
|
failing on missing pthread symbols.
|
|
|
|
|
2015-05-15 19:09:01 +02:00
|
|
|
26. If a group that contained a recursive back reference also contained a
|
|
|
|
forward reference subroutine call followed by a non-forward-reference
|
|
|
|
subroutine call, for example /.((?2)(?R)\1)()/, pcre2_compile() failed to
|
|
|
|
compile correct code, leading to undefined behaviour or an internally detected
|
2015-05-03 18:46:56 +02:00
|
|
|
error. This bug was discovered by the LLVM fuzzer.
|
|
|
|
|
2015-05-15 19:09:01 +02:00
|
|
|
27. Quantification of certain items (e.g. atomic back references) could cause
|
|
|
|
incorrect code to be compiled when recursive forward references were involved.
|
2015-05-06 18:51:25 +02:00
|
|
|
For example, in this pattern: /(?1)()((((((\1++))\x85)+)|))/. This bug was
|
|
|
|
discovered by the LLVM fuzzer.
|
|
|
|
|
2015-05-08 18:32:28 +02:00
|
|
|
28. A repeated conditional group whose condition was a reference by name caused
|
|
|
|
a buffer overflow if there was more than one group with the given name. This
|
|
|
|
bug was discovered by the LLVM fuzzer.
|
|
|
|
|
2015-05-15 19:09:01 +02:00
|
|
|
29. A recursive back reference by name within a group that had the same name as
|
|
|
|
another group caused a buffer overflow. For example: /(?J)(?'d'(?'d'\g{d}))/.
|
|
|
|
This bug was discovered by the LLVM fuzzer.
|
|
|
|
|
2015-05-16 13:01:48 +02:00
|
|
|
30. A forward reference by name to a group whose number is the same as the
|
|
|
|
current group, for example in this pattern: /(?|(\k'Pm')|(?'Pm'))/, caused a
|
|
|
|
buffer overflow at compile time. This bug was discovered by the LLVM fuzzer.
|
|
|
|
|
2015-06-18 18:39:25 +02:00
|
|
|
31. Fix -fsanitize=undefined warnings for left shifts of 1 by 31 (it treats 1
|
2015-05-16 18:02:46 +02:00
|
|
|
as an int; fixed by writing it as 1u).
|
|
|
|
|
2015-06-18 18:39:25 +02:00
|
|
|
32. Fix pcre2grep compile when -std=c99 is used with gcc, though it still gives
|
2015-05-16 18:52:45 +02:00
|
|
|
a warning for "fileno" unless -std=gnu99 us used.
|
|
|
|
|
2015-06-18 18:39:25 +02:00
|
|
|
33. A lookbehind assertion within a set of mutually recursive subpatterns could
|
2015-05-18 19:31:29 +02:00
|
|
|
provoke a buffer overflow. This bug was discovered by the LLVM fuzzer.
|
|
|
|
|
2015-05-19 18:48:57 +02:00
|
|
|
34. Give an error for an empty subpattern name such as (?'').
|
|
|
|
|
2015-06-18 18:39:25 +02:00
|
|
|
35. Make pcre2test give an error if a pattern that follows #forbud_utf contains
|
2015-05-20 19:44:17 +02:00
|
|
|
\P, \p, or \X.
|
|
|
|
|
2015-06-18 18:39:25 +02:00
|
|
|
36. The way named subpatterns are handled has been refactored. There is now a
|
2015-06-03 18:27:47 +02:00
|
|
|
pre-pass over the regex which does nothing other than identify named
|
|
|
|
subpatterns and count the total captures. This means that information about
|
2015-06-18 18:39:25 +02:00
|
|
|
named patterns is known before the rest of the compile. In particular, it means
|
|
|
|
that forward references can be checked as they are encountered. Previously, the
|
|
|
|
code for handling forward references was contorted and led to several errors in
|
|
|
|
computing the memory requirements for some patterns, leading to buffer
|
2015-06-03 18:27:47 +02:00
|
|
|
overflows.
|
|
|
|
|
2015-06-08 19:51:54 +02:00
|
|
|
37. There was no check for integer overflow in subroutine calls such as (?123).
|
|
|
|
|
2015-06-09 18:33:44 +02:00
|
|
|
38. The table entry for \l in EBCDIC environments was incorrect, leading to its
|
|
|
|
being treated as a literal 'l' instead of causing an error.
|
|
|
|
|
2015-06-09 19:41:45 +02:00
|
|
|
39. If a non-capturing group containing a conditional group that could match
|
2015-06-18 18:39:25 +02:00
|
|
|
an empty string was repeated, it was not identified as matching an empty string
|
2015-06-09 19:41:45 +02:00
|
|
|
itself. For example: /^(?:(?(1)x|)+)+$()/.
|
|
|
|
|
2015-06-12 18:25:23 +02:00
|
|
|
40. In an EBCDIC environment, pcretest was mishandling the escape sequences
|
2015-06-18 18:39:25 +02:00
|
|
|
\a and \e in test subject lines.
|
2015-06-12 18:25:23 +02:00
|
|
|
|
|
|
|
41. In an EBCDIC environment, \a in a pattern was converted to the ASCII
|
|
|
|
instead of the EBCDIC value.
|
|
|
|
|
2015-06-13 18:10:14 +02:00
|
|
|
42. The handling of \c in an EBCDIC environment has been revised so that it is
|
|
|
|
now compatible with the specification in Perl's perlebcdic page.
|
|
|
|
|
2015-06-16 13:37:19 +02:00
|
|
|
43. Single character repetition in JIT has been improved. 20-30% speedup
|
|
|
|
was achieved on certain patterns.
|
|
|
|
|
2015-06-19 18:41:22 +02:00
|
|
|
44. The EBCDIC character 0x41 is a non-breaking space, equivalent to 0xa0 in
|
|
|
|
ASCII/Unicode. This has now been added to the list of characters that are
|
|
|
|
recognized as white space in EBCDIC.
|
2015-07-02 15:18:14 +02:00
|
|
|
|
2015-06-19 18:41:22 +02:00
|
|
|
45. When PCRE2 was compiled without Unicode support, the use of \p and \P gave
|
|
|
|
an error (correctly) when used outside a class, but did not give an error
|
|
|
|
within a class.
|
|
|
|
|
2015-07-02 15:18:14 +02:00
|
|
|
46. \h within a class was incorrectly compiled in EBCDIC environments.
|
2015-06-22 15:40:23 +02:00
|
|
|
|
2015-06-28 15:31:24 +02:00
|
|
|
47. JIT should return with error when the compiled pattern requires
|
|
|
|
more stack space than the maximum.
|
|
|
|
|
2015-06-30 12:28:59 +02:00
|
|
|
48. Fixed a memory leak in pcre2grep when a locale is set.
|
|
|
|
|
2015-03-11 18:44:16 +01:00
|
|
|
|
2015-03-06 16:08:29 +01:00
|
|
|
Version 10.10 06-March-2015
|
|
|
|
---------------------------
|
2015-01-13 17:01:24 +01:00
|
|
|
|
2015-01-23 17:51:47 +01:00
|
|
|
1. When a pattern is compiled, it remembers the highest back reference so that
|
|
|
|
when matching, if the ovector is too small, extra memory can be obtained to
|
2015-01-13 17:01:24 +01:00
|
|
|
use instead. A conditional subpattern whose condition is a check on a capture
|
|
|
|
having happened, such as, for example in the pattern /^(?:(a)|b)(?(1)A|B)/, is
|
|
|
|
another kind of back reference, but it was not setting the highest
|
|
|
|
backreference number. This mattered only if pcre2_match() was called with an
|
|
|
|
ovector that was too small to hold the capture, and there was no other kind of
|
|
|
|
back reference (a situation which is probably quite rare). The effect of the
|
|
|
|
bug was that the condition was always treated as FALSE when the capture could
|
|
|
|
not be consulted, leading to a incorrect behaviour by pcre2_match(). This bug
|
|
|
|
has been fixed.
|
|
|
|
|
2015-01-23 17:51:47 +01:00
|
|
|
2. Functions for serialization and deserialization of sets of compiled patterns
|
|
|
|
have been added.
|
|
|
|
|
|
|
|
3. The value that is returned by PCRE2_INFO_SIZE has been corrected to remove
|
|
|
|
excess code units at the end of the data block that may occasionally occur if
|
|
|
|
the code for calculating the size over-estimates. This change stops the
|
|
|
|
serialization code copying uninitialized data, to which valgrind objects. The
|
|
|
|
documentation of PCRE2_INFO_SIZE was incorrect in stating that the size did not
|
|
|
|
include the general overhead. This has been corrected.
|
|
|
|
|
|
|
|
4. All code units in every slot in the table of group names are now set, again
|
|
|
|
in order to avoid accessing uninitialized data when serializing.
|
|
|
|
|
2015-01-26 15:57:27 +01:00
|
|
|
5. The (*NO_JIT) feature is implemented.
|
|
|
|
|
2015-01-27 18:21:32 +01:00
|
|
|
6. If a bug that caused pcre2_compile() to use more memory than allocated was
|
2015-02-20 12:20:40 +01:00
|
|
|
triggered when using valgrind, the code in (3) above passed a stupidly large
|
2015-01-27 18:21:32 +01:00
|
|
|
value to valgrind. This caused a crash instead of an "internal error" return.
|
|
|
|
|
2015-02-20 12:20:40 +01:00
|
|
|
7. A reference to a duplicated named group (either a back reference or a test
|
|
|
|
for being set in a conditional) that occurred in a part of the pattern where
|
|
|
|
PCRE2_DUPNAMES was not set caused the amount of memory needed for the pattern
|
2015-01-27 18:21:32 +01:00
|
|
|
to be incorrectly calculated, leading to overwriting.
|
|
|
|
|
2015-02-20 12:20:40 +01:00
|
|
|
8. A mutually recursive set of back references such as (\2)(\1) caused a
|
|
|
|
segfault at compile time (while trying to find the minimum matching length).
|
2015-01-28 12:28:53 +01:00
|
|
|
The infinite loop is now broken (with the minimum length unset, that is, zero).
|
|
|
|
|
2015-02-20 12:20:40 +01:00
|
|
|
9. If an assertion that was used as a condition was quantified with a minimum
|
|
|
|
of zero, matching went wrong. In particular, if the whole group had unlimited
|
2015-01-28 18:31:11 +01:00
|
|
|
repetition and could match an empty string, a segfault was likely. The pattern
|
|
|
|
(?(?=0)?)+ is an example that caused this. Perl allows assertions to be
|
|
|
|
quantified, but not if they are being used as conditions, so the above pattern
|
|
|
|
is faulted by Perl. PCRE2 has now been changed so that it also rejects such
|
|
|
|
patterns.
|
|
|
|
|
2015-02-20 12:20:40 +01:00
|
|
|
10. The error message for an invalid quantifier has been changed from "nothing
|
2015-01-28 18:31:11 +01:00
|
|
|
to repeat" to "quantifier does not follow a repeatable item".
|
|
|
|
|
2015-02-06 17:47:15 +01:00
|
|
|
11. If a bad UTF string is compiled with NO_UTF_CHECK, it may succeed, but
|
|
|
|
scanning the compiled pattern in subsequent auto-possessification can get out
|
|
|
|
of step and lead to an unknown opcode. Previously this could have caused an
|
|
|
|
infinite loop. Now it generates an "internal error" error. This is a tidyup,
|
|
|
|
not a bug fix; passing bad UTF with NO_UTF_CHECK is documented as having an
|
|
|
|
undefined outcome.
|
|
|
|
|
2015-02-20 12:20:40 +01:00
|
|
|
12. A UTF pattern containing a "not" match of a non-ASCII character and a
|
2015-02-06 18:51:55 +01:00
|
|
|
subroutine reference could loop at compile time. Example: /[^\xff]((?1))/.
|
|
|
|
|
2015-02-20 12:20:40 +01:00
|
|
|
13. The locale test (RunTest 3) has been upgraded. It now checks that a locale
|
|
|
|
that is found in the output of "locale -a" can actually be set by pcre2test
|
|
|
|
before it is accepted. Previously, in an environment where a locale was listed
|
|
|
|
but would not set (an example does exist), the test would "pass" without
|
|
|
|
actually doing anything. Also the fr_CA locale has been added to the list of
|
2015-02-07 18:45:55 +01:00
|
|
|
locales that can be used.
|
|
|
|
|
2015-02-10 13:48:45 +01:00
|
|
|
14. Fixed a bug in pcre2_substitute(). If a replacement string ended in a
|
|
|
|
capturing group number without parentheses, the last character was incorrectly
|
|
|
|
literally included at the end of the replacement string.
|
|
|
|
|
2015-02-11 11:06:09 +01:00
|
|
|
15. A possessive capturing group such as (a)*+ with a minimum repeat of zero
|
2015-02-20 12:20:40 +01:00
|
|
|
failed to allow the zero-repeat case if pcre2_match() was called with an
|
2015-02-11 11:06:09 +01:00
|
|
|
ovector too small to capture the group.
|
|
|
|
|
2015-02-21 19:53:51 +01:00
|
|
|
16. Improved error message in pcre2test when setting the stack size (-S) fails.
|
|
|
|
|
2015-02-26 18:36:29 +01:00
|
|
|
17. Fixed two bugs in CMakeLists.txt: (1) Some lines had got lost in the
|
|
|
|
transfer from PCRE1, meaning that CMake configuration failed if "build tests"
|
|
|
|
was selected. (2) The file src/pcre2_serialize.c had not been added to the list
|
2015-02-24 13:35:28 +01:00
|
|
|
of PCRE2 sources, which caused a failure to build pcre2test.
|
|
|
|
|
2015-02-26 18:36:29 +01:00
|
|
|
18. Fixed typo in pcre2_serialize.c (DECL instead of DEFN) that causes problems
|
2015-02-24 15:21:28 +01:00
|
|
|
only on Windows.
|
|
|
|
|
2015-02-25 18:19:28 +01:00
|
|
|
19. Use binary input when reading back saved serialized patterns in pcre2test.
|
|
|
|
|
|
|
|
20. Added RunTest.bat for running the tests under Windows.
|
|
|
|
|
2015-03-06 16:08:29 +01:00
|
|
|
21. "make distclean" was not removing config.h, a file that may be created for
|
|
|
|
use with CMake.
|
2015-02-26 18:20:48 +01:00
|
|
|
|
2015-02-28 12:31:51 +01:00
|
|
|
22. A pattern such as "((?2){0,1999}())?", which has a group containing a
|
|
|
|
forward reference repeated a large (but limited) number of times within a
|
|
|
|
repeated outer group that has a zero minimum quantifier, caused incorrect code
|
|
|
|
to be compiled, leading to the error "internal error: previously-checked
|
|
|
|
referenced subpattern not found" when an incorrect memory address was read.
|
|
|
|
This bug was reported as "heap overflow", discovered by Kai Lu of Fortinet's
|
2015-03-24 11:21:34 +01:00
|
|
|
FortiGuard Labs. (Added 24-March-2015: CVE-2015-2325 was given to this.)
|
2015-02-28 12:31:51 +01:00
|
|
|
|
2015-03-01 19:34:05 +01:00
|
|
|
23. A pattern such as "((?+1)(\1))/" containing a forward reference subroutine
|
|
|
|
call within a group that also contained a recursive back reference caused
|
|
|
|
incorrect code to be compiled. This bug was reported as "heap overflow",
|
2015-03-24 11:21:34 +01:00
|
|
|
discovered by Kai Lu of Fortinet's FortiGuard Labs. (Added 24-March-2015:
|
|
|
|
CVE-2015-2326 was given to this.)
|
2015-03-01 19:34:05 +01:00
|
|
|
|
2015-03-06 08:57:23 +01:00
|
|
|
24. Computing the size of the JIT read-only data in advance has been a source
|
|
|
|
of various issues, and new ones are still appear unfortunately. To fix
|
|
|
|
existing and future issues, size computation is eliminated from the code,
|
|
|
|
and replaced by on-demand memory allocation.
|
|
|
|
|
2015-03-06 12:57:06 +01:00
|
|
|
25. A pattern such as /(?i)[A-`]/, where characters in the other case are
|
|
|
|
adjacent to the end of the range, and the range contained characters with more
|
|
|
|
than one other case, caused incorrect behaviour when compiled in UTF mode. In
|
|
|
|
that example, the range a-j was left out of the class.
|
|
|
|
|
2015-01-13 17:01:24 +01:00
|
|
|
|
2015-01-23 17:51:47 +01:00
|
|
|
Version 10.00 05-January-2015
|
2015-01-05 17:02:11 +01:00
|
|
|
-----------------------------
|
2014-08-26 17:41:31 +02:00
|
|
|
|
2014-11-24 16:31:28 +01:00
|
|
|
Version 10.00 is the first release of PCRE2, a revised API for the PCRE
|
|
|
|
library. Changes prior to 10.00 are logged in the ChangeLog file for the old
|
|
|
|
API, up to item 20 for release 8.36.
|
2014-08-26 17:41:31 +02:00
|
|
|
|
2014-10-20 19:28:49 +02:00
|
|
|
The code of the library was heavily revised as part of the new API
|
|
|
|
implementation. Details of each and every modification were not individually
|
|
|
|
logged. In addition to the API changes, the following changes were made. They
|
|
|
|
are either new functionality, or bug fixes and other noticeable changes of
|
2014-08-30 18:21:17 +02:00
|
|
|
behaviour that were implemented after the code had been forked.
|
2014-08-26 17:41:31 +02:00
|
|
|
|
2015-01-23 17:51:47 +01:00
|
|
|
1. Including Unicode support at build time is now enabled by default, but it
|
|
|
|
can optionally be disabled. It is not enabled by default at run time (no
|
|
|
|
change).
|
2014-11-03 19:27:56 +01:00
|
|
|
|
|
|
|
2. The test program, now called pcre2test, was re-specified and almost
|
2014-08-26 17:41:31 +02:00
|
|
|
completely re-written. Its input is not compatible with input for pcretest.
|
|
|
|
|
2014-11-03 19:27:56 +01:00
|
|
|
3. Patterns may start with (*NOTEMPTY) or (*NOTEMPTY_ATSTART) to set the
|
2014-10-20 19:28:49 +02:00
|
|
|
PCRE2_NOTEMPTY or PCRE2_NOTEMPTY_ATSTART options for every subject line that is
|
2014-08-26 17:41:31 +02:00
|
|
|
matched by that pattern.
|
|
|
|
|
2014-11-03 19:27:56 +01:00
|
|
|
4. For the benefit of those who use PCRE2 via some other application, that is,
|
2014-10-20 19:28:49 +02:00
|
|
|
not writing the function calls themselves, it is possible to check the PCRE2
|
2014-11-24 16:31:28 +01:00
|
|
|
version by matching a pattern such as /(?(VERSION>=10)yes|no)/ against a
|
2014-08-26 17:41:31 +02:00
|
|
|
string such as "yesno".
|
|
|
|
|
2014-11-03 19:27:56 +01:00
|
|
|
5. There are case-equivalent Unicode characters whose encodings use different
|
2014-10-20 19:28:49 +02:00
|
|
|
numbers of code units in UTF-8. U+023A and U+2C65 are one example. (It is
|
|
|
|
theoretically possible for this to happen in UTF-16 too.) If a backreference to
|
|
|
|
a group containing one of these characters was greedily repeated, and during
|
2014-08-27 18:59:56 +02:00
|
|
|
the match a backtrack occurred, the subject might be backtracked by the wrong
|
2014-10-20 19:28:49 +02:00
|
|
|
number of code units. For example, if /^(\x{23a})\1*(.)/ is matched caselessly
|
|
|
|
(and in UTF-8 mode) against "\x{23a}\x{2c65}\x{2c65}\x{2c65}", group 2 should
|
2014-08-27 18:59:56 +02:00
|
|
|
capture the final character, which is the three bytes E2, B1, and A5 in UTF-8.
|
2014-10-20 19:28:49 +02:00
|
|
|
Incorrect backtracking meant that group 2 captured only the last two bytes.
|
|
|
|
This bug has been fixed; the new code is slower, but it is used only when the
|
2014-08-27 18:59:56 +02:00
|
|
|
strings matched by the repetition are not all the same length.
|
|
|
|
|
2014-11-03 19:27:56 +01:00
|
|
|
6. A pattern such as /()a/ was not setting the "first character must be 'a'"
|
2014-10-20 19:28:49 +02:00
|
|
|
information. This applied to any pattern with a group that matched no
|
2014-08-30 18:21:17 +02:00
|
|
|
characters, for example: /(?:(?=.)|(?<!x))a/.
|
|
|
|
|
2014-11-05 17:05:19 +01:00
|
|
|
7. When an (*ACCEPT) is triggered inside capturing parentheses, it arranges for
|
|
|
|
those parentheses to be closed with whatever has been captured so far. However,
|
2014-11-24 16:31:28 +01:00
|
|
|
it was failing to mark any other groups between the highest capture so far and
|
2014-11-05 17:05:19 +01:00
|
|
|
the currrent group as "unset". Thus, the ovector for those groups contained
|
|
|
|
whatever was previously there. An example is the pattern /(x)|((*ACCEPT))/ when
|
|
|
|
matched against "abcd".
|
|
|
|
|
2014-11-14 19:41:20 +01:00
|
|
|
8. The pcre2_substitute() function has been implemented.
|
|
|
|
|
2014-11-24 16:31:28 +01:00
|
|
|
9. If an assertion used as a condition was quantified with a minimum of zero
|
|
|
|
(an odd thing to do, but it happened), SIGSEGV or other misbehaviour could
|
|
|
|
occur.
|
2014-11-19 12:17:20 +01:00
|
|
|
|
2015-01-02 18:09:16 +01:00
|
|
|
10. The PCRE2_NO_DOTSTAR_ANCHOR option has been implemented.
|
|
|
|
|
2014-08-26 17:41:31 +02:00
|
|
|
****
|