NEWS 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. News about PCRE2 releases
  2. -------------------------
  3. Version 10.39 29-October-2021
  4. -----------------------------
  5. This release is happening soon after 10.38 because the bug fix is important.
  6. 1. Fix incorrect detection of alternatives in first character search in JIT.
  7. 2. Update to Unicode 14.0.0.
  8. 3. Some code cleanups (see ChangeLog).
  9. Version 10.38 01-October-2021
  10. -----------------------------
  11. As well as some bug fixes and tidies (as always, see ChangeLog for details),
  12. the documentation is updated to list the new URLs, following the move of the
  13. source repository to GitHub and the mailing list to Google Groups.
  14. * The CMake build system can now build both static and shared libraries in one
  15. go.
  16. * Following Perl's lead, \K is now locked out in lookaround assertions by
  17. default, but an option is provided to re-enable the previous behaviour.
  18. Version 10.37 26-May-2021
  19. -------------------------
  20. A few more bug fixes and tidies. The only change of real note is the removal of
  21. the actual POSIX names regcomp etc. from the POSIX wrapper library because
  22. these have caused issues for some applications (see 10.33 #2 below).
  23. Version 10.36 04-December-2020
  24. ------------------------------
  25. Again, mainly bug fixes and tidies. The only enhancements are the addition of
  26. GNU grep's -m (aka --max-count) option to pcre2grep, and also unifying the
  27. handling of substitution strings for both -O and callouts in pcre2grep, with
  28. the addition of $x{...} and $o{...} to allow for characters whose code points
  29. are greater than 255 in Unicode mode.
  30. NOTE: there is an outstanding issue with JIT support for MacOS on arm64
  31. hardware. For details, please see Bugzilla issue #2618.
  32. Version 10.35 15-April-2020
  33. ---------------------------
  34. Bugfixes, tidies, and a few new enhancements.
  35. 1. Capturing groups that contain recursive backreferences to themselves are no
  36. longer automatically atomic, because the restriction is no longer necessary
  37. as a result of the 10.30 restructuring.
  38. 2. Several new options for pcre2_substitute().
  39. 3. When Unicode is supported and PCRE2_UCP is set without PCRE2_UTF, Unicode
  40. character properties are used for upper/lower case computations on characters
  41. whose code points are greater than 127.
  42. 4. The character tables (for low-valued characters) can now more easily be
  43. saved and restored in binary.
  44. 5. Updated to Unicode 13.0.0.
  45. Version 10.34 21-November-2019
  46. ------------------------------
  47. Another release with a few enhancements as well as bugfixes and tidies. The
  48. main new features are:
  49. 1. There is now some support for matching in invalid UTF strings.
  50. 2. Non-atomic positive lookarounds are implemented in the pcre2_match()
  51. interpreter, but not in JIT.
  52. 3. Added two new functions: pcre2_get_match_data_size() and
  53. pcre2_maketables_free().
  54. 4. Upgraded to Unicode 12.1.0.
  55. Version 10.33 16-April-2019
  56. ---------------------------
  57. Yet more bugfixes, tidies, and a few enhancements, summarized here (see
  58. ChangeLog for the full list):
  59. 1. Callouts from pcre2_substitute() are now available.
  60. 2. The POSIX functions are now all called pcre2_regcomp() etc., with wrapper
  61. functions that use the standard POSIX names. However, in pcre2posix.h the POSIX
  62. names are defined as macros. This should help avoid linking with the wrong
  63. library in some environments, while still exporting the POSIX names for
  64. pre-existing programs that use them.
  65. 3. Some new options:
  66. (a) PCRE2_EXTRA_ESCAPED_CR_IS_LF makes \r behave as \n.
  67. (b) PCRE2_EXTRA_ALT_BSUX enables support for ECMAScript 6's \u{hh...}
  68. construct.
  69. (c) PCRE2_COPY_MATCHED_SUBJECT causes a copy of a matched subject to be
  70. made, instead of just remembering a pointer.
  71. 4. Some new Perl features:
  72. (a) Perl 5.28's experimental alphabetic names for atomic groups and
  73. lookaround assertions, for example, (*pla:...) and (*atomic:...).
  74. (b) The new Perl "script run" features (*script_run:...) and
  75. (*atomic_script_run:...) aka (*sr:...) and (*asr:...).
  76. (c) When PCRE2_UTF is set, allow non-ASCII letters and decimal digits in
  77. capture group names.
  78. 5. --disable-percent-zt disables the use of %zu and %td in formatting strings
  79. in pcre2test. They were already automatically disabled for VC and older C
  80. compilers.
  81. 6. Some changes related to callouts in pcre2grep:
  82. (a) Support for running an external program under VMS has been added, in
  83. addition to Windows and fork() support.
  84. (b) --disable-pcre2grep-callout-fork restricts the callout support in
  85. to the inbuilt echo facility.
  86. Version 10.32 10-September-2018
  87. -------------------------------
  88. This is another mainly bugfix and tidying release with a few minor
  89. enhancements. These are the main ones:
  90. 1. pcre2grep now supports the inclusion of binary zeros in patterns that are
  91. read from files via the -f option.
  92. 2. ./configure now supports --enable-jit=auto, which automatically enables JIT
  93. if the hardware supports it.
  94. 3. In pcre2_dfa_match(), internal recursive calls no longer use the stack for
  95. local workspace and local ovectors. Instead, an initial block of stack is
  96. reserved, but if this is insufficient, heap memory is used. The heap limit
  97. parameter now applies to pcre2_dfa_match().
  98. 4. Updated to Unicode version 11.0.0.
  99. 5. (*ACCEPT:ARG), (*FAIL:ARG), and (*COMMIT:ARG) are now supported.
  100. 6. Added support for \N{U+dddd}, but only in Unicode mode.
  101. 7. Added support for (?^) to unset all imnsx options.
  102. Version 10.31 12-February-2018
  103. ------------------------------
  104. This is mainly a bugfix and tidying release (see ChangeLog for full details).
  105. However, there are some minor enhancements.
  106. 1. New pcre2_config() options: PCRE2_CONFIG_NEVER_BACKSLASH_C and
  107. PCRE2_CONFIG_COMPILED_WIDTHS.
  108. 2. New pcre2_pattern_info() option PCRE2_INFO_EXTRAOPTIONS to retrieve the
  109. extra compile time options.
  110. 3. There are now public names for all the pcre2_compile() error numbers.
  111. 4. Added PCRE2_CALLOUT_STARTMATCH and PCRE2_CALLOUT_BACKTRACK bits to a new
  112. field callout_flags in callout blocks.
  113. Version 10.30 14-August-2017
  114. ----------------------------
  115. The full list of changes that includes bugfixes and tidies is, as always, in
  116. ChangeLog. These are the most important new features:
  117. 1. The main interpreter, pcre2_match(), has been refactored into a new version
  118. that does not use recursive function calls (and therefore the system stack) for
  119. remembering backtracking positions. This makes --disable-stack-for-recursion a
  120. NOOP. The new implementation allows backtracking into recursive group calls in
  121. patterns, making it more compatible with Perl, and also fixes some other
  122. previously hard-to-do issues. For patterns that have a lot of backtracking, the
  123. heap is now used, and there is an explicit limit on the amount, settable by
  124. pcre2_set_heap_limit() or (*LIMIT_HEAP=xxx). The "recursion limit" is retained,
  125. but is renamed as "depth limit" (though the old names remain for
  126. compatibility).
  127. There is also a change in the way callouts from pcre2_match() are handled. The
  128. offset_vector field in the callout block is no longer a pointer to the
  129. actual ovector that was passed to the matching function in the match data
  130. block. Instead it points to an internal ovector of a size large enough to hold
  131. all possible captured substrings in the pattern.
  132. 2. The new option PCRE2_ENDANCHORED insists that a pattern match must end at
  133. the end of the subject.
  134. 3. The new option PCRE2_EXTENDED_MORE implements Perl's /xx feature, and
  135. pcre2test is upgraded to support it. Setting within the pattern by (?xx) is
  136. also supported.
  137. 4. (?n) can be used to set PCRE2_NO_AUTO_CAPTURE, because Perl now has this.
  138. 5. Additional compile options in the compile context are now available, and the
  139. first two are: PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES and
  140. PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL.
  141. 6. The newline type PCRE2_NEWLINE_NUL is now available.
  142. 7. The match limit value now also applies to pcre2_dfa_match() as there are
  143. patterns that can use up a lot of resources without necessarily recursing very
  144. deeply.
  145. 8. The option REG_PEND (a GNU extension) is now available for the POSIX
  146. wrapper. Also there is a new option PCRE2_LITERAL which is used to support
  147. REG_NOSPEC.
  148. 9. PCRE2_EXTRA_MATCH_LINE and PCRE2_EXTRA_MATCH_WORD are implemented for the
  149. benefit of pcre2grep, and pcre2grep's -F, -w, and -x options are re-implemented
  150. using PCRE2_LITERAL, PCRE2_EXTRA_MATCH_WORD, and PCRE2_EXTRA_MATCH_LINE. This
  151. is tidier and also fixes some bugs.
  152. 10. The Unicode tables are upgraded from Unicode 8.0.0 to Unicode 10.0.0.
  153. 11. There are some experimental functions for converting foreign patterns
  154. (globs and POSIX patterns) into PCRE2 patterns.
  155. Version 10.23 14-February-2017
  156. ------------------------------
  157. 1. ChangeLog has the details of a lot of bug fixes and tidies.
  158. 2. There has been a major re-factoring of the pcre2_compile.c file. Most syntax
  159. checking is now done in the pre-pass that identifies capturing groups. This has
  160. reduced the amount of duplication and made the code tidier. While doing this,
  161. some minor bugs and Perl incompatibilities were fixed (see ChangeLog for
  162. details.)
  163. 3. Back references are now permitted in lookbehind assertions when there are
  164. no duplicated group numbers (that is, (?| has not been used), and, if the
  165. reference is by name, there is only one group of that name. The referenced
  166. group must, of course be of fixed length.
  167. 4. \g{+<number>} (e.g. \g{+2} ) is now supported. It is a "forward back
  168. reference" and can be useful in repetitions (compare \g{-<number>} ). Perl does
  169. not recognize this syntax.
  170. 5. pcre2grep now automatically expands its buffer up to a maximum set by
  171. --max-buffer-size.
  172. 6. The -t option (grand total) has been added to pcre2grep.
  173. 7. A new function called pcre2_code_copy_with_tables() exists to copy a
  174. compiled pattern along with a private copy of the character tables that is
  175. uses.
  176. 8. A user supplied a number of patches to upgrade pcre2grep under Windows and
  177. tidy the code.
  178. 9. Several updates have been made to pcre2test and test scripts (see
  179. ChangeLog).
  180. Version 10.22 29-July-2016
  181. --------------------------
  182. 1. ChangeLog has the details of a number of bug fixes.
  183. 2. The POSIX wrapper function regcomp() did not used to support back references
  184. and subroutine calls if called with the REG_NOSUB option. It now does.
  185. 3. A new function, pcre2_code_copy(), is added, to make a copy of a compiled
  186. pattern.
  187. 4. Support for string callouts is added to pcre2grep.
  188. 5. Added the PCRE2_NO_JIT option to pcre2_match().
  189. 6. The pcre2_get_error_message() function now returns with a negative error
  190. code if the error number it is given is unknown.
  191. 7. Several updates have been made to pcre2test and test scripts (see
  192. ChangeLog).
  193. Version 10.21 12-January-2016
  194. -----------------------------
  195. 1. Many bugs have been fixed. A large number of them were provoked only by very
  196. strange pattern input, and were discovered by fuzzers. Some others were
  197. discovered by code auditing. See ChangeLog for details.
  198. 2. The Unicode tables have been updated to Unicode version 8.0.0.
  199. 3. For Perl compatibility in EBCDIC environments, ranges such as a-z in a
  200. class, where both values are literal letters in the same case, omit the
  201. non-letter EBCDIC code points within the range.
  202. 4. There have been a number of enhancements to the pcre2_substitute() function,
  203. giving more flexibility to replacement facilities. It is now also possible to
  204. cause the function to return the needed buffer size if the one given is too
  205. small.
  206. 5. The PCRE2_ALT_VERBNAMES option causes the "name" parts of special verbs such
  207. as (*THEN:name) to be processed for backslashes and to take note of
  208. PCRE2_EXTENDED.
  209. 6. PCRE2_INFO_HASBACKSLASHC makes it possible for a client to find out if a
  210. pattern uses \C, and --never-backslash-C makes it possible to compile a version
  211. PCRE2 in which the use of \C is always forbidden.
  212. 7. A limit to the length of pattern that can be handled can now be set by
  213. calling pcre2_set_max_pattern_length().
  214. 8. When matching an unanchored pattern, a match can be required to begin within
  215. a given number of code units after the start of the subject by calling
  216. pcre2_set_offset_limit().
  217. 9. The pcre2test program has been extended to test new facilities, and it can
  218. now run the tests when LF on its own is not a valid newline sequence.
  219. 10. The RunTest script has also been updated to enable more tests to be run.
  220. 11. There have been some minor performance enhancements.
  221. Version 10.20 30-June-2015
  222. --------------------------
  223. 1. Callouts with string arguments and the pcre2_callout_enumerate() function
  224. have been implemented.
  225. 2. The PCRE2_NEVER_BACKSLASH_C option, which locks out the use of \C, is added.
  226. 3. The PCRE2_ALT_CIRCUMFLEX option lets ^ match after a newline at the end of a
  227. subject in multiline mode.
  228. 4. The way named subpatterns are handled has been refactored. The previous
  229. approach had several bugs.
  230. 5. The handling of \c in EBCDIC environments has been changed to conform to the
  231. perlebcdic document. This is an incompatible change.
  232. 6. Bugs have been mended, many of them discovered by fuzzers.
  233. Version 10.10 06-March-2015
  234. ---------------------------
  235. 1. Serialization and de-serialization functions have been added to the API,
  236. making it possible to save and restore sets of compiled patterns, though
  237. restoration must be done in the same environment that was used for compilation.
  238. 2. The (*NO_JIT) feature has been added; this makes it possible for a pattern
  239. creator to specify that JIT is not to be used.
  240. 3. A number of bugs have been fixed. In particular, bugs that caused building
  241. on Windows using CMake to fail have been mended.
  242. Version 10.00 05-January-2015
  243. -----------------------------
  244. Version 10.00 is the first release of PCRE2, a revised API for the PCRE
  245. library. Changes prior to 10.00 are logged in the ChangeLog file for the old
  246. API, up to item 20 for release 8.36. New programs are recommended to use the
  247. new library. Programs that use the original (PCRE1) API will need changing
  248. before linking with the new library.
  249. ****