summaryrefslogtreecommitdiff
path: root/ext/pcre
Commit message (Collapse)AuthorAgeFilesLines
* Add pcre_get_compiled_regex_cache_ex() with local_aware flagSergei Turchanov2019-10-082-2/+11
| | | | | | | | | A new function `pcre_get_compiled_regex_cache_ex()` is introduced, which allows to compile regexp pattern using the "C" locale instead of a current locale. This will be needed to replace setlocale() usage in fileinfo, which is not thread-safe.
* Merge branch 'PHP-7.1' into PHP-7.2Stanislav Malyshev2019-08-251-0/+10
|\ | | | | | | | | * PHP-7.1: Fix #75457: heap-use-after-free in php7.0.25
| * Fix #75457: heap-use-after-free in php7.0.25Christoph M. Becker2019-08-252-1/+20
| | | | | | | | Backport <https://vcs.pcre.org/pcre?view=revision&revision=1638>.
| * Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1526-33/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| * Trim trailing whitespace in *.phptPeter Kokot2018-10-1430-50/+50
| |
| * Sync leading and final newlines in source code filesPeter Kokot2018-10-142-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| * Trim trailing whitespace in source code filesPeter Kokot2018-10-132-3/+3
| |
| * Convert CRLF line endings to LFPeter Kokot2018-10-132-69/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies line endings tracked in the Git repository and syncs them to all include the LF style instead of the CRLF files. Newline characters: - LF (\n) (*nix and Mac) - CRLF (\r\n) (Windows) - CR (\r) (old Mac, obsolete) To see which line endings are in the index and in the working copy the following command can be used: `git ls-files --eol` Git additionally provides `.gitattributes` file to specify if some files need to have specific line endings on all platforms (either CRLF or LF). Changed files shouldn't cause issues on modern Windows platforms because also Git can do output conversion is core.autocrlf=true is set on Windows and use CRLF newlines in all files in the working tree. Unless CRLF files are tracked specifically, Git by default tracks all files in the index using LF newlines.
| * year++Xinchen Hui2018-01-022-2/+2
| |
* | Accept null for preg_quote delimiter argumentNikita Popov2019-06-171-1/+1
| | | | | | | | Related to bug #78163.
* | Fix #77827: preg_match does not ignore \r in regex flagsChristoph M. Becker2019-03-312-0/+15
| |
* | ensure pcre.jit=1 for these testsRemi Collet2019-03-221-0/+3
| |
* | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1527-34/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* | Trim trailing whitespace in *.phptPeter Kokot2018-10-1430-50/+50
| |
* | Sync leading and final newlines in source code filesPeter Kokot2018-10-142-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* | Trim trailing whitespace in source code filesPeter Kokot2018-10-132-3/+3
| |
* | Convert CRLF line endings to LFPeter Kokot2018-10-131-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies line endings tracked in the Git repository and syncs them to all include the LF style instead of the CRLF files. Newline characters: - LF (\n) (*nix and Mac) - CRLF (\r\n) (Windows) - CR (\r) (old Mac, obsolete) To see which line endings are in the index and in the working copy the following command can be used: `git ls-files --eol` Git additionally provides `.gitattributes` file to specify if some files need to have specific line endings on all platforms (either CRLF or LF). Changed files shouldn't cause issues on modern Windows platforms because also Git can do output conversion is core.autocrlf=true is set on Windows and use CRLF newlines in all files in the working tree. Unless CRLF files are tracked specifically, Git by default tracks all files in the index using LF newlines.
* | Fixed possible incorrect "mark" usageDmitry Stogov2018-01-091-0/+5
| |
* | year++Xinchen Hui2018-01-022-2/+2
| |
* | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2017-12-061-1/+3
|\ \ | |/ | | | | | | * PHP-7.1: Fix yet one data race in PCRE
| * Fix yet one data race in PCREAnatol Belski2017-12-061-1/+3
| | | | | | | | | | | | | | | | PCRE 8.x initializes the pattern compiler on demand during the first pcre_study call. It could be worse, but since the compiled patterns are cached, the locking impact is minimal. PCRE 10.x always compiles the pattern and thread sanitizer doesn't complain about the compiler initialization, thus the newer PCRE version seems to be unafected.
* | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2017-12-051-1/+1
|\ \ | |/ | | | | | | * PHP-7.1: Fix use after free revealed by phpdbg
| * Fix use after free revealed by phpdbgAnatol Belski2017-12-051-1/+1
| |
| * Fixed bug #75601 Thread race in PCRE JIT supportAnatol Belski2017-12-051-0/+18
| |
* | Fixed bug #75601 Thread race in PCRE JIT supportAnatol Belski2017-12-051-0/+18
| |
* | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2017-11-213-0/+36
|\ \ | |/ | | | | | | * PHP-7.1: Fixed #75539 and #74183 - preg_last_error not returning error code after error
| * Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2017-11-213-0/+36
| |\ | | | | | | | | | | | | * PHP-7.0: Fixed #75539 and #74183 - preg_last_error not returning error code after error
| | * Fixed #75539 and #74183 - preg_last_error not returning error code after errorNester2017-11-213-0/+36
| | |
* | | Fix UTF check in pcre_grepAnatol Belski2017-11-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | In this case it loops through different subjects without looking for sub matches and matches are done against the same pattern. Thus, don't reset the UTF check flag but use it to check whether JIT should be used and otherwise let PCRE to do the job according to what was saved into the pattern.
* | | Fix uninitialized flag when JIT is disabledAnatol Belski2017-11-141-1/+1
| | |
* | | Fixed bug #75285i Broken build when system libpcre don't have jit supportRemi Collet2017-09-291-8/+16
| | | | | | | | | | | | | | | Detect JIT support in system library, So --with-pcre-jit is only for bundled library.
* | | Revert --with-pcre-valgrind by default in debug buildAnatol Belski2017-09-291-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After quite a few people reported this option enabled to be in many cases not handy by default, it's reverted to no by default everywhere. If enabled, it requires Valgrind dev packages, where just a few have Valgrind itself installed or care. Still for PCRE related work this option is a must, though will have to be turned on by hand. Revert "fix default args for --with-pcre-valgrind" This reverts commit 24de0fe9f4f92178adba27e2f1353e97a956b4a8. Revert "Enable valgrind support for PCRE by default in debug builds" This reverts commit 850bb998d9664e849ed743ea031dd0ee2a64cc9d.
* | | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2017-09-281-0/+10
|\ \ \ | |/ / | | | | | | | | | * PHP-7.1: Apply upstream patch for CVE-2016-1283
| * | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2017-09-282-1/+16
| |\ \ | | |/ | | | | | | | | | * PHP-7.0: Apply upstream patch for CVE-2016-1283
| | * Apply upstream patch for CVE-2016-1283Anatol Belski2017-09-282-1/+16
| | | | | | | | | | | | | | | | | | Fix bug #75207, see also https://bugzilla.redhat.com/show_bug.cgi?id=1295385 https://vcs.pcre.org/pcre?view=revision&revision=1636
* | | Fixed bug #75089 (preg_grep() is not reporting PREG_BAD_UTF8_ERROR after ↵Dmitry Stogov2017-08-182-7/+11
| | | | | | | | | | | | first input string)
* | | fix default args for --with-pcre-valgrindAnatol Belski2017-07-131-4/+9
| | |
* | | Enable valgrind support for PCRE by default in debug buildsAnatol Belski2017-07-131-2/+5
| | | | | | | | | | | | Thanks Nikita for the hint.
* | | Upgrade bundled PCRE to 8.41Anatol Belski2017-07-1175-8824/+10889
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HEADSUP! With PCRE 8.39 the JIT related code was changed in the way, that additional valgrind options became almost unavoidable. Valgrind had it already sometimes hard with JIT, now there are seem to be more cases requiring special valgrind options. For this reason, the new configure option --with-pcre-valgrind was introduced. The option is development/debugging only and turns on the Valgrind related pieces in PCRE, so then false positives are avoided to the big part. In addition, run-tests.php was added a new valgrind option, when the leak check is enabled and the test filepath contains pcre. Thus, to debug the code related to PCRE with JIT enabled, two things would likely make sense - configure --with-pcre-valgrind - valgrind option --smc-check=all if run-tests.php is not used The checks so far reveal no new issues.
* | | Fixed bug #74873 (Minor BC break: PCRE_JIT changes output of preg_match()).Dmitry Stogov2017-07-072-0/+12
| | |
* | | Merge branch 'PHP-7.1'Stanislav Malyshev2017-07-041-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.1: Improve fix for #74145 Fix wddx Fix tests Fixed bug #74111 Fix bug #74603 - use correct buffer size Fix bug #74651 - check EVP_SealInit as it can return -1 Update NEWS Fix bug #74087 Fixed parsing of strange formats with mixed month/day and time strings Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV Fixed bug #74111 Fix #74435: Buffer over-read into uninitialized memory Fix bug #74603 - use correct buffer size Fix bug #74651 - check EVP_SealInit as it can return -1 Update NEWS Fix bug #73807
| * | Merge branch 'PHP-7.0' into PHP-7.1Stanislav Malyshev2017-07-041-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.0: Improve fix for #74145 Fix wddx Fix tests Fixed bug #74111 Fix bug #74603 - use correct buffer size Fix bug #74651 - check EVP_SealInit as it can return -1 Update NEWS Fix bug #74087 Fixed parsing of strange formats with mixed month/day and time strings Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV Fixed bug #74111 Fix #74435: Buffer over-read into uninitialized memory Fix bug #74603 - use correct buffer size Fix bug #74651 - check EVP_SealInit as it can return -1 Update NEWS Fix bug #73807
| | * Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2017-07-041-1/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6: Update NEWS Fix bug #74087 Fixed parsing of strange formats with mixed month/day and time strings Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV Fixed bug #74111 Fix #74435: Buffer over-read into uninitialized memory Fix bug #74603 - use correct buffer size Fix bug #74651 - check EVP_SealInit as it can return -1 Update NEWS Fix bug #73807
| | | * Fix bug #74087Stanislav Malyshev2017-07-041-1/+1
| | | | | | | | | | | | | | | | Ported from https://vcs.pcre.org/pcre/code/trunk/pcre_jit_compile.c?r1=1676&r2=1680&view=patch
| | | * Fixed bug #73174 - heap overflow in php_pcre_replace_implStanislav Malyshev2016-09-281-8/+14
| | | |
| | | * Fix various int size overflows.Stanislav Malyshev2016-09-121-7/+7
| | | | | | | | | | | | | | | | | | | | Add function for detection of string zvals with length that does not fit INT_MAX.
| * | | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2017-01-071-6/+6
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.0: Revert "Test request47456.phpt for PR 1303" on PHP-7.0 and PHP-7.1
| | * | Revert "Test request47456.phpt for PR 1303" on PHP-7.0 and PHP-7.1Mitch Hagstrand2017-01-071-6/+6
| | | | | | | | | | | | | | | | | | | | This reverts commit e55e93a1e335bec39b7edb28f0b8470fa974f4e3. This change should only apply to master. Not PHP-7.0 or PHP-7.1
| * | | Merge branch 'PHP-7.0' into PHP-7.1Joe Watkins2017-01-061-6/+6
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.0: Test request47456.phpt for PR 1303
| | * | Test request47456.phpt for PR 1303Mitch Hagstrand2017-01-061-6/+6
| | | | | | | | | | | | | | | | After merging PR 1303 unmatched subpatterns are set to NULL