Skip to content

Commit 52c0884

Browse files
committed
Final file tidies for 10.42
1 parent f2411ac commit 52c0884

12 files changed

+83
-51
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -944,8 +944,8 @@ IF(PCRE2_BUILD_TESTS)
944944

945945
IF(PCRE2_BUILD_PCRE2_8)
946946
ADD_EXECUTABLE(pcre2posix_test src/pcre2posix_test.c)
947-
SET(targets ${targets} pcre2posix_test)
948-
TARGET_LINK_LIBRARIES(pcre2posix_test pcre2-posix pcre2-8)
947+
SET(targets ${targets} pcre2posix_test)
948+
TARGET_LINK_LIBRARIES(pcre2posix_test pcre2-posix pcre2-8)
949949
ENDIF(PCRE2_BUILD_PCRE2_8)
950950

951951
IF(PCRE2_SUPPORT_JIT)
@@ -1062,11 +1062,11 @@ echo RunTest.bat tests successfully completed
10621062
IF(PCRE2_SUPPORT_JIT)
10631063
ADD_TEST(pcre2_jit_test pcre2_jit_test)
10641064
ENDIF(PCRE2_SUPPORT_JIT)
1065-
1065+
10661066
IF(PCRE2_BUILD_PCRE2_8)
1067-
ADD_TEST(pcre2posix_test pcre2posix_test)
1067+
ADD_TEST(pcre2posix_test pcre2posix_test)
10681068
ENDIF(PCRE2_BUILD_PCRE2_8)
1069-
1069+
10701070

10711071
ENDIF(PCRE2_BUILD_TESTS)
10721072

ChangeLog

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,28 @@ Change Log for PCRE2 - see also the Git log
22
-------------------------------------------
33

44

5-
Version 10.42 10-December-2022
5+
Version 10.42 11-December-2022
66
------------------------------
77

8-
1. Change 19 of 10.41 wasn't quite right; it put the definition of a default,
9-
empty value for PCRE2_CALL_CONVENTION in src/pcre2posix.c instead of
10-
src/pcre2posix.h, which meant that programs that included pcre2posix.h but not
8+
1. Change 19 of 10.41 wasn't quite right; it put the definition of a default,
9+
empty value for PCRE2_CALL_CONVENTION in src/pcre2posix.c instead of
10+
src/pcre2posix.h, which meant that programs that included pcre2posix.h but not
1111
pcre2.h failed to compile.
1212

13-
2. To catch similar issues to the above in future, a new small test program
13+
2. To catch similar issues to the above in future, a new small test program
1414
that includes pcre2posix.h but not pcre2.h has been added to the test suite.
1515

16-
3. When the -S option of pcre2test was used to set a stack size greater than
17-
the allowed maximum, the error message displayed the hard limit incorrectly.
18-
This was pointed out on GitHub pull request #171, but the suggested patch
16+
3. When the -S option of pcre2test was used to set a stack size greater than
17+
the allowed maximum, the error message displayed the hard limit incorrectly.
18+
This was pointed out on GitHub pull request #171, but the suggested patch
1919
didn't cope with all cases. Some further modification was required.
2020

21-
4. Supplying an ovector count of more than 65535 to pcre2_match_data_create()
22-
caused a crash because the field in the match data block is only 16 bits. A
21+
4. Supplying an ovector count of more than 65535 to pcre2_match_data_create()
22+
caused a crash because the field in the match data block is only 16 bits. A
2323
maximum of 65535 is now silently applied.
2424

25+
5. Merged @carenas patch #175 which fixes #86 - segfault on aarch64 (ARM),
26+
2527

2628
Version 10.41 06-December-2022
2729
------------------------------

NEWS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@ News about PCRE2 releases
22
-------------------------
33

44

5+
Version 10.42 11-December-2022
6+
------------------------------
7+
8+
This is an unexpectedly early release to fix a problem that was introduced in
9+
10.41. ChangeLog number 19 (GitHub #139) added the default definition of
10+
PCRE2_CALL_CONVENTION to pcre2posix.c instead of pcre2posix.h, which meant that
11+
programs including pcre2posix.h but not pcre2.h couldn't compile. A new test
12+
that checks this case has been added.
13+
14+
A couple of other minor issues are also fixed, and a patch for an intermittent
15+
JIT fault is also included. See ChangeLog and the Git log.
16+
17+
518
Version 10.41 06-December-2022
619
------------------------------
720

NON-AUTOTOOLS-BUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ environment, for example.
185185
by running pcre2test with the -jit option. This is done automatically by
186186
the RunTest script. You might also like to build and run the freestanding
187187
JIT test program, src/pcre2_jit_test.c.
188-
188+
189189
(11) The pcre2test program tests the POSIX wrapper library, but there is also a
190-
freestanding test program in src/pcre2posix_test.c. It must be linked with
191-
both the pcre2posix library and the 8-bit PCRE2 library.
190+
freestanding test program in src/pcre2posix_test.c. It must be linked with
191+
both the pcre2posix library and the 8-bit PCRE2 library.
192192

193193
(12) If you want to use the pcre2grep command, compile and link
194194
src/pcre2grep.c; it uses only the basic 8-bit PCRE2 library (it does not

configure.ac

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ dnl The PCRE2_PRERELEASE feature is for identifying release candidates. It might
99
dnl be defined as -RC2, for example. For real releases, it should be empty.
1010

1111
m4_define(pcre2_major, [10])
12-
m4_define(pcre2_minor, [41])
12+
m4_define(pcre2_minor, [42])
1313
m4_define(pcre2_prerelease, [])
14-
m4_define(pcre2_date, [2022-12-06])
14+
m4_define(pcre2_date, [2022-12-11])
1515

1616
# Libtool shared library interface versions (current:revision:age)
17-
m4_define(libpcre2_8_version, [11:1:11])
18-
m4_define(libpcre2_16_version, [11:1:11])
19-
m4_define(libpcre2_32_version, [11:1:11])
20-
m4_define(libpcre2_posix_version, [3:3:0])
17+
m4_define(libpcre2_8_version, [11:2:11])
18+
m4_define(libpcre2_16_version, [11:2:11])
19+
m4_define(libpcre2_32_version, [11:2:11])
20+
m4_define(libpcre2_posix_version, [3:4:0])
2121

2222
# NOTE: The CMakeLists.txt file searches for the above variables in the first
2323
# 50 lines of this file. Please update that if the variables above are moved.

doc/html/NON-AUTOTOOLS-BUILD.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ environment, for example.
6969
Note also that the src/config.h.generic file is created from a config.h
7070
that was generated by Autotools, which automatically includes settings of
7171
a number of macros that are not actually used by PCRE2 (for example,
72-
HAVE_MEMORY_H).
72+
HAVE_DLFCN_H).
7373

7474
(2) Copy or rename the file src/pcre2.h.generic as src/pcre2.h.
7575

@@ -136,7 +136,7 @@ environment, for example.
136136
pcre2_jit_compile.c #includes other files from the sljit subdirectory,
137137
all of whose names begin with "sljit". It also #includes
138138
src/pcre2_jit_match.c and src/pcre2_jit_misc.c, so you should not compile
139-
these yourself.
139+
those yourself.
140140

141141
Note also that the pcre2_fuzzsupport.c file contains special code that is
142142
useful to those who want to run fuzzing tests on the PCRE2 library. Unless
@@ -186,7 +186,11 @@ environment, for example.
186186
the RunTest script. You might also like to build and run the freestanding
187187
JIT test program, src/pcre2_jit_test.c.
188188

189-
(11) If you want to use the pcre2grep command, compile and link
189+
(11) The pcre2test program tests the POSIX wrapper library, but there is also a
190+
freestanding test program in src/pcre2posix_test.c. It must be linked with
191+
both the pcre2posix library and the 8-bit PCRE2 library.
192+
193+
(12) If you want to use the pcre2grep command, compile and link
190194
src/pcre2grep.c; it uses only the basic 8-bit PCRE2 library (it does not
191195
need the pcre2posix library). If you have built the PCRE2 library with JIT
192196
support by defining SUPPORT_JIT in src/config.h, you can also define
@@ -406,6 +410,6 @@ Everything in that location, source and executable, is in EBCDIC and native
406410
z/OS file formats. The port provides an API for LE languages such as COBOL and
407411
for the z/OS and z/VM versions of the Rexx languages.
408412

409-
===========================
410-
Last Updated: 28 April 2021
411-
===========================
413+
==============================
414+
Last Updated: 10 December 2022
415+
==============================

doc/html/README.txt

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,9 @@ library. They are also documented in the pcre2build man page.
376376
because, to quote the readline INSTALL, "Readline uses the termcap functions,
377377
but does not link with the termcap or curses library itself, allowing
378378
applications which link with readline the option to choose an appropriate
379-
library."
380-
If you get error messages about missing functions tgetstr, tgetent, tputs,
381-
tgetflag, or tgoto, this is the problem, and linking with the ncurses library
382-
should fix it.
379+
library." If you get error messages about missing functions tgetstr, tgetent,
380+
tputs, tgetflag, or tgoto, this is the problem, and linking with the ncurses
381+
library should fix it.
383382

384383
. The C99 standard defines formatting modifiers z and t for size_t and
385384
ptrdiff_t values, respectively. By default, PCRE2 uses these modifiers in
@@ -409,9 +408,9 @@ library. They are also documented in the pcre2build man page.
409408
. Releases before 10.30 could be compiled with --disable-stack-for-recursion,
410409
which caused pcre2_match() to use individual blocks on the heap for
411410
backtracking instead of recursive function calls (which use the stack). This
412-
is now obsolete since pcre2_match() was refactored always to use the heap (in
413-
a much more efficient way than before). This option is retained for backwards
414-
compatibility, but has no effect other than to output a warning.
411+
is now obsolete because pcre2_match() was refactored always to use the heap
412+
(in a much more efficient way than before). This option is retained for
413+
backwards compatibility, but has no effect other than to output a warning.
415414

416415
The "configure" script builds the following files for the basic C library:
417416

@@ -439,8 +438,9 @@ Once "configure" has run, you can run "make". This builds whichever of the
439438
libraries libpcre2-8, libpcre2-16 and libpcre2-32 are configured, and a test
440439
program called pcre2test. If you enabled JIT support with --enable-jit, another
441440
test program called pcre2_jit_test is built as well. If the 8-bit library is
442-
built, libpcre2-posix and the pcre2grep command are also built. Running
443-
"make" with the -j option may speed up compilation on multiprocessor systems.
441+
built, libpcre2-posix, pcre2posix_test, and the pcre2grep command are also
442+
built. Running "make" with the -j option may speed up compilation on
443+
multiprocessor systems.
444444

445445
The command "make check" runs all the appropriate tests. Details of the PCRE2
446446
tests are given below in a separate section of this document. The -j option of
@@ -592,9 +592,11 @@ Testing PCRE2
592592

593593
To test the basic PCRE2 library on a Unix-like system, run the RunTest script.
594594
There is another script called RunGrepTest that tests the pcre2grep command.
595-
When JIT support is enabled, a third test program called pcre2_jit_test is
596-
built. Both the scripts and all the program tests are run if you obey "make
597-
check". For other environments, see the instructions in NON-AUTOTOOLS-BUILD.
595+
When the 8-bit library is built, a test program for the POSIX wrapper, called
596+
pcre2posix_test, is compiled, and when JIT support is enabled, a test program
597+
called pcre2_jit_test is built. The scripts and the program tests are all run
598+
when you obey "make check". For other environments, see the instructions in
599+
NON-AUTOTOOLS-BUILD.
598600

599601
The RunTest script runs the pcre2test test program (which is documented in its
600602
own man page) on each of the relevant testinput files in the testdata
@@ -717,6 +719,9 @@ and with UTF support, respectively. Test 23 tests \C when it is locked out.
717719
Tests 24 and 25 test the experimental pattern conversion functions, without and
718720
with UTF support, respectively.
719721

722+
Test 26 checks Unicode property support using tests that are generated
723+
automatically from the Unicode data tables.
724+
720725

721726
Character tables
722727
----------------
@@ -820,6 +825,7 @@ The distribution should contain the files listed below.
820825
src/pcre2_substring.c )
821826
src/pcre2_tables.c )
822827
src/pcre2_ucd.c )
828+
src/pcre2_ucptables.c )
823829
src/pcre2_valid_utf.c )
824830
src/pcre2_xclass.c )
825831

@@ -831,6 +837,8 @@ The distribution should contain the files listed below.
831837
src/pcre2posix.h header for the external POSIX wrapper API
832838
src/pcre2_internal.h header for internal use
833839
src/pcre2_intmodedep.h a mode-specific internal header
840+
src/pcre2_jit_neon_inc.h header used by JIT
841+
src/pcre2_jit_simd_inc.h header used by JIT
834842
src/pcre2_ucp.h header for Unicode property handling
835843

836844
sljit/* source files for the JIT compiler
@@ -841,6 +849,7 @@ The distribution should contain the files listed below.
841849
src/pcre2grep.c source of a grep utility that uses PCRE2
842850
src/pcre2test.c comprehensive test program
843851
src/pcre2_jit_test.c JIT test program
852+
src/pcre2posix_test.c POSIX wrapper API test program
844853

845854
(C) Auxiliary files:
846855

@@ -912,4 +921,4 @@ The distribution should contain the files listed below.
912921
Philip Hazel
913922
Email local part: Philip.Hazel
914923
Email domain: gmail.com
915-
Last updated: 15 April 2022
924+
Last updated: 10 December 2022

doc/html/pcre2api.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2543,7 +2543,9 @@ <h1>pcre2api man page</h1>
25432543
A minimum of at least 1 pair is imposed by <b>pcre2_match_data_create()</b>, so
25442544
it is always possible to return the overall matched string in the case of
25452545
<b>pcre2_match()</b> or the longest match in the case of
2546-
<b>pcre2_dfa_match()</b>.
2546+
<b>pcre2_dfa_match()</b>. The maximum number of pairs is 65535; if the the first
2547+
argument of <b>pcre2_match_data_create()</b> is greater than this, 65535 is
2548+
used.
25472549
</P>
25482550
<P>
25492551
The second argument of <b>pcre2_match_data_create()</b> is a pointer to a

doc/pcre2.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2494,7 +2494,9 @@ THE MATCH DATA BLOCK
24942494
A minimum of at least 1 pair is imposed by pcre2_match_data_create(),
24952495
so it is always possible to return the overall matched string in the
24962496
case of pcre2_match() or the longest match in the case of
2497-
pcre2_dfa_match().
2497+
pcre2_dfa_match(). The maximum number of pairs is 65535; if the the
2498+
first argument of pcre2_match_data_create() is greater than this, 65535
2499+
is used.
24982500

24992501
The second argument of pcre2_match_data_create() is a pointer to a gen-
25002502
eral context, which can specify custom memory management for obtaining

src/config.h.generic

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ sure both macros are undefined; an emulation function will then be used. */
236236
#define PACKAGE_NAME "PCRE2"
237237

238238
/* Define to the full name and version of this package. */
239-
#define PACKAGE_STRING "PCRE2 10.41"
239+
#define PACKAGE_STRING "PCRE2 10.42"
240240

241241
/* Define to the one symbol short name of this package. */
242242
#define PACKAGE_TARNAME "pcre2"
@@ -245,7 +245,7 @@ sure both macros are undefined; an emulation function will then be used. */
245245
#define PACKAGE_URL ""
246246

247247
/* Define to the version of this package. */
248-
#define PACKAGE_VERSION "10.41"
248+
#define PACKAGE_VERSION "10.42"
249249

250250
/* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
251251
parentheses (of any kind) in a pattern. This limits the amount of system
@@ -438,7 +438,7 @@ sure both macros are undefined; an emulation function will then be used. */
438438
#endif
439439

440440
/* Version number of package */
441-
#define VERSION "10.41"
441+
#define VERSION "10.42"
442442

443443
/* Number of bits in a file offset, on hosts where this is settable. */
444444
/* #undef _FILE_OFFSET_BITS */

src/pcre2.h.generic

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
4242
/* The current PCRE version information. */
4343

4444
#define PCRE2_MAJOR 10
45-
#define PCRE2_MINOR 41
45+
#define PCRE2_MINOR 42
4646
#define PCRE2_PRERELEASE
47-
#define PCRE2_DATE 2022-12-06
47+
#define PCRE2_DATE 2022-12-11
4848

4949
/* When an application links to a PCRE DLL in Windows, the symbols that are
5050
imported have to be identified as such. When building PCRE2, the appropriate

src/pcre2_match_data.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ POSSIBILITY OF SUCH DAMAGE.
5151
* Create a match data block given ovector size *
5252
*************************************************/
5353

54-
/* A minimum of 1 is imposed on the number of ovector pairs. A maximum is also
54+
/* A minimum of 1 is imposed on the number of ovector pairs. A maximum is also
5555
imposed because the oveccount field in a match data block is uintt6_t. */
5656

5757
PCRE2_EXP_DEFN pcre2_match_data * PCRE2_CALL_CONVENTION

0 commit comments

Comments
 (0)