| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
* PHP-8.0:
Fix locale switch back to C in pcre
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.4:
Fix locale switch back to C in pcre
|
| | |
| | |
| | |
| | |
| | |
| | | |
The compile context is shared between patterns, so we need to set
the character tables unconditionally in case we switched from
a non-C locale to the C locale.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Fix bug #80866
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
Fix bug #80866
|
| | |
| | |
| | |
| | | |
Closes GH-6774.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.
Of course, zend_bool is retained as an alias.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
Separation can only possibly make sense for array parameters
(or something that can contain arrays, like zval parameters). It
never makes sense to separate a bool.
The deref parameters are also of dubious utility, but leaving them
for now.
|
| | |
|
| |
| |
| |
| | |
Closes GH-6259
|
| |
| |
| |
| | |
Apparently this "feature" was completely untested...
|
| |
| |
| |
| |
| |
| |
| | |
They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.
Closes GH-6112
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Create a separate general context that uses ZMM as allocator and
use it to allocate temporary PCRE match data (there is still one
global match data). There is no requirement that the match data
and the compiled regex / match context use the same general context.
This makes sure that we do not leak persistent memory on bailout
and fixes oss-fuzz #25296, on which half the libfuzzer runs
currently get stuck.
|
| |
| |
| |
| | |
Closes GH-6006
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From an engine perspective, named parameters mainly add three
concepts:
* The SEND_* opcodes now accept a CONST op2, which is the
argument name. For now, it is looked up by linear scan and
runtime cached.
* This may leave UNDEF arguments on the stack. To avoid having
to deal with them in other places, a CHECK_UNDEF_ARGS opcode
is used to either replace them with defaults, or error.
* For variadic functions, EX(extra_named_params) are collected
and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.
RFC: https://wiki.php.net/rfc/named_params
Closes GH-5357.
|
| | |
|
| | |
|
| |
| |
| |
| | |
All of these clearly do not need separation support.
|
| |
| |
| |
| | |
Closes GH-5758
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add ZVAL_CHAR/RETVAL_CHAR/RETURN_CHAR as a shortcut for using
ZVAL_INTERNED_STRING and ZSTR_CHAR.
Add zend_string_init_fast() as a helper for the empty string /
one char interned string / zend_string_init() pattern.
Also add corresponding ZVAL_STRINGL_FAST etc macros.
Closes GH-5684.
|
| |
| |
| |
| | |
Closes GH-5676.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We already document that this is the case, but currently it's only
true if setlocale() has not been called. Make sure ctype_string is
always NULL, even with an explicit "C" locale call, so we can
more efficiently check whether we are in the "C" locale.
Closes GH-5542.
|
| |
| |
| |
| |
| | |
To make it more obvious that this only refers to the LC_CTYPE
locale.
|
| | |
|
| |
| |
| |
| | |
Closes GH-5352
|
| |
| |
| |
| | |
Closes GH-5278
|
| |
| |
| |
| |
| |
| |
| |
| | |
Provides the last PCRE error as a human-readable message, similar
to functionality existing in other extensions, such as
json_last_error_msg().
Closes GH-5185.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fixed bug #79257
|
| |
| |
| |
| | |
Replace an existing entry for a given name only if we have a match.
|
|\ \
| |/
| |
| |
| |
| | |
* PHP-7.4:
PCRE: Only remember valid UTF-8 if start offset zero
PCRE: Check whether start offset is on char boundary
|
| |
| |
| |
| |
| |
| |
| | |
PCRE only validates the string starting from the start offset
(minus maximum look-behind, but let's ignore that), so we can
only remember that the string is fully valid UTF-8 is the original
start offset is zero.
|
| |
| |
| |
| |
| |
| | |
We need not just the whole string to be UTF-8, but the start
position to be on a character boundary as well. Check this by
looking for a continuation byte.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fixed bug #79188
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
Fixed bug #79188
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #78853: preg_match() may return integer > 1
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #78853: preg_match() may return integer > 1
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Commit 54ebebd[1] optimized the match loop, but for this case it has
been overlooked, that we must only loop if we're doing global matching.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=54ebebd686255c5f124af718c966edb392782d4a>
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix php_pcre_mutex_free()
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix php_pcre_mutex_free()
|
| | |
| | |
| | |
| | |
| | |
| | | |
We should only set the mutex to NULL if we actually freed it.
Due to missing braces non-main threads may currently set it to
NULL first.
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | |\ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
As ZPP now throws, it makes no sense to specify an explicit return
value.
|
|\ \ \ \
| |/ / / |
|
| |\ \ \
| | |/ / |
|