Skip to content

Commit

Permalink
Final file tidies for 10.42
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipHazel committed Dec 12, 2022
1 parent f2411ac commit 52c0884
Show file tree
Hide file tree
Showing 12 changed files with 83 additions and 51 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,8 @@ IF(PCRE2_BUILD_TESTS)

IF(PCRE2_BUILD_PCRE2_8)
ADD_EXECUTABLE(pcre2posix_test src/pcre2posix_test.c)
SET(targets ${targets} pcre2posix_test)
TARGET_LINK_LIBRARIES(pcre2posix_test pcre2-posix pcre2-8)
SET(targets ${targets} pcre2posix_test)
TARGET_LINK_LIBRARIES(pcre2posix_test pcre2-posix pcre2-8)
ENDIF(PCRE2_BUILD_PCRE2_8)

IF(PCRE2_SUPPORT_JIT)
Expand Down Expand Up @@ -1062,11 +1062,11 @@ echo RunTest.bat tests successfully completed
IF(PCRE2_SUPPORT_JIT)
ADD_TEST(pcre2_jit_test pcre2_jit_test)
ENDIF(PCRE2_SUPPORT_JIT)

IF(PCRE2_BUILD_PCRE2_8)
ADD_TEST(pcre2posix_test pcre2posix_test)
ADD_TEST(pcre2posix_test pcre2posix_test)
ENDIF(PCRE2_BUILD_PCRE2_8)


ENDIF(PCRE2_BUILD_TESTS)

Expand Down
22 changes: 12 additions & 10 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@ Change Log for PCRE2 - see also the Git log
-------------------------------------------


Version 10.42 10-December-2022
Version 10.42 11-December-2022
------------------------------

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

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

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

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

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


Version 10.41 06-December-2022
------------------------------
Expand Down
13 changes: 13 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@ News about PCRE2 releases
-------------------------


Version 10.42 11-December-2022
------------------------------

This is an unexpectedly early release to fix a problem that was introduced in
10.41. ChangeLog number 19 (GitHub #139) added the default definition of
PCRE2_CALL_CONVENTION to pcre2posix.c instead of pcre2posix.h, which meant that
programs including pcre2posix.h but not pcre2.h couldn't compile. A new test
that checks this case has been added.

A couple of other minor issues are also fixed, and a patch for an intermittent
JIT fault is also included. See ChangeLog and the Git log.


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

Expand Down
6 changes: 3 additions & 3 deletions NON-AUTOTOOLS-BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ environment, for example.
by running pcre2test with the -jit option. This is done automatically by
the RunTest script. You might also like to build and run the freestanding
JIT test program, src/pcre2_jit_test.c.

(11) The pcre2test program tests the POSIX wrapper library, but there is also a
freestanding test program in src/pcre2posix_test.c. It must be linked with
both the pcre2posix library and the 8-bit PCRE2 library.
freestanding test program in src/pcre2posix_test.c. It must be linked with
both the pcre2posix library and the 8-bit PCRE2 library.

(12) If you want to use the pcre2grep command, compile and link
src/pcre2grep.c; it uses only the basic 8-bit PCRE2 library (it does not
Expand Down
12 changes: 6 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ dnl The PCRE2_PRERELEASE feature is for identifying release candidates. It might
dnl be defined as -RC2, for example. For real releases, it should be empty.

m4_define(pcre2_major, [10])
m4_define(pcre2_minor, [41])
m4_define(pcre2_minor, [42])
m4_define(pcre2_prerelease, [])
m4_define(pcre2_date, [2022-12-06])
m4_define(pcre2_date, [2022-12-11])

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

# NOTE: The CMakeLists.txt file searches for the above variables in the first
# 50 lines of this file. Please update that if the variables above are moved.
Expand Down
16 changes: 10 additions & 6 deletions doc/html/NON-AUTOTOOLS-BUILD.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ environment, for example.
Note also that the src/config.h.generic file is created from a config.h
that was generated by Autotools, which automatically includes settings of
a number of macros that are not actually used by PCRE2 (for example,
HAVE_MEMORY_H).
HAVE_DLFCN_H).

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

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

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

(11) If you want to use the pcre2grep command, compile and link
(11) The pcre2test program tests the POSIX wrapper library, but there is also a
freestanding test program in src/pcre2posix_test.c. It must be linked with
both the pcre2posix library and the 8-bit PCRE2 library.

(12) If you want to use the pcre2grep command, compile and link
src/pcre2grep.c; it uses only the basic 8-bit PCRE2 library (it does not
need the pcre2posix library). If you have built the PCRE2 library with JIT
support by defining SUPPORT_JIT in src/config.h, you can also define
Expand Down Expand Up @@ -406,6 +410,6 @@ Everything in that location, source and executable, is in EBCDIC and native
z/OS file formats. The port provides an API for LE languages such as COBOL and
for the z/OS and z/VM versions of the Rexx languages.

===========================
Last Updated: 28 April 2021
===========================
==============================
Last Updated: 10 December 2022
==============================
35 changes: 22 additions & 13 deletions doc/html/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,9 @@ library. They are also documented in the pcre2build man page.
because, to quote the readline INSTALL, "Readline uses the termcap functions,
but does not link with the termcap or curses library itself, allowing
applications which link with readline the option to choose an appropriate
library."
If you get error messages about missing functions tgetstr, tgetent, tputs,
tgetflag, or tgoto, this is the problem, and linking with the ncurses library
should fix it.
library." If you get error messages about missing functions tgetstr, tgetent,
tputs, tgetflag, or tgoto, this is the problem, and linking with the ncurses
library should fix it.

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

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

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

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

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

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

Test 26 checks Unicode property support using tests that are generated
automatically from the Unicode data tables.


Character tables
----------------
Expand Down Expand Up @@ -820,6 +825,7 @@ The distribution should contain the files listed below.
src/pcre2_substring.c )
src/pcre2_tables.c )
src/pcre2_ucd.c )
src/pcre2_ucptables.c )
src/pcre2_valid_utf.c )
src/pcre2_xclass.c )

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

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

(C) Auxiliary files:

Expand Down Expand Up @@ -912,4 +921,4 @@ The distribution should contain the files listed below.
Philip Hazel
Email local part: Philip.Hazel
Email domain: gmail.com
Last updated: 15 April 2022
Last updated: 10 December 2022
4 changes: 3 additions & 1 deletion doc/html/pcre2api.html
Original file line number Diff line number Diff line change
Expand Up @@ -2543,7 +2543,9 @@ <h1>pcre2api man page</h1>
A minimum of at least 1 pair is imposed by <b>pcre2_match_data_create()</b>, so
it is always possible to return the overall matched string in the case of
<b>pcre2_match()</b> or the longest match in the case of
<b>pcre2_dfa_match()</b>.
<b>pcre2_dfa_match()</b>. The maximum number of pairs is 65535; if the the first
argument of <b>pcre2_match_data_create()</b> is greater than this, 65535 is
used.
</P>
<P>
The second argument of <b>pcre2_match_data_create()</b> is a pointer to a
Expand Down
4 changes: 3 additions & 1 deletion doc/pcre2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2494,7 +2494,9 @@ THE MATCH DATA BLOCK
A minimum of at least 1 pair is imposed by pcre2_match_data_create(),
so it is always possible to return the overall matched string in the
case of pcre2_match() or the longest match in the case of
pcre2_dfa_match().
pcre2_dfa_match(). The maximum number of pairs is 65535; if the the
first argument of pcre2_match_data_create() is greater than this, 65535
is used.

The second argument of pcre2_match_data_create() is a pointer to a gen-
eral context, which can specify custom memory management for obtaining
Expand Down
6 changes: 3 additions & 3 deletions src/config.h.generic
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define PACKAGE_NAME "PCRE2"

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

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

/* Define to the version of this package. */
#define PACKAGE_VERSION "10.41"
#define PACKAGE_VERSION "10.42"

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

/* Version number of package */
#define VERSION "10.41"
#define VERSION "10.42"

/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
Expand Down
4 changes: 2 additions & 2 deletions src/pcre2.h.generic
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */

#define PCRE2_MAJOR 10
#define PCRE2_MINOR 41
#define PCRE2_MINOR 42
#define PCRE2_PRERELEASE
#define PCRE2_DATE 2022-12-06
#define PCRE2_DATE 2022-12-11

/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE2, the appropriate
Expand Down
2 changes: 1 addition & 1 deletion src/pcre2_match_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ POSSIBILITY OF SUCH DAMAGE.
* Create a match data block given ovector size *
*************************************************/

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

PCRE2_EXP_DEFN pcre2_match_data * PCRE2_CALL_CONVENTION
Expand Down

0 comments on commit 52c0884

Please sign in to comment.