| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
We must not access memory outside of the allocated buffer.
|
| |
|
|
|
|
| |
all-access permissions
|
|
|
|
|
|
|
|
| |
variant objects have no (declared) properties, so the `get_properties`
handlers returns a pointer to constant storage for efficiency reasons.
This pointer must not be returned from the `get_gc` handler, though;
instead we set up an own `get_gc` handler and return NULL from it, to
signal that there are no properties to collect.
|
| |
|
|\
| |
| |
| |
| | |
* PHP-7.3:
Fix #78090: bug45161.phpt takes forever to finish
|
| |
| |
| |
| |
| |
| | |
Not all systems support the discard protocol (TCP port 9), and since
there is no particular reason to use it, we switch to using actual
server testing.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix #79191: Error in SoapClient ctor disables DOMDocument::save()
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The culprit is the too restrictive fix for bug #71536, which prevents
`php_libxml_streams_IO_write()` from properly executing when unclean
shutdown is flagged. A *more* suitable solution is to move the
`xmlwriter_free_resource_ptr()` call from the `free_obj` handler to an
added `dtor_obj` handler, to avoid to write to a closed stream in case
of late object freeing. This makes the `EG(active)` guard superfluous.
We also fix bug79029.phpt which has to use different variables for the
three parts to actually check the original shutdown issue.
Thanks to bwoebi and daverandom for helping to investigate this issue.
|
| |
| |
| |
| | |
Mostly reindent PHP scripts to spaces.
|
| |
| |
| |
| |
| | |
Many parts are disabled for the PHP-7.4 branch. We only strip
trailing whitespace in C files and reindent .php files to spaces.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Relax test expectation
|
| |
| |
| |
| |
| |
| |
| | |
Since we're dealing with floating point numbers, precision issues may
hit us, and actually it's not necessary to check for the exact number
anyway, because it is not exact in the first place. Therefore, we
relax the test expectations.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix #79212: NumberFormatter::format() may detect wrong type
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have to convert to number *before* detecting the type, to cater to
internal objects implementing `cast_object`.
We also get rid of the fallback behavior of using `FORMAT_TYPE_INT32`,
because that can no longer happen; after `convert_scalar_to_number_ex`
the type is either `IS_LONG` or `IS_DOUBLE`. We cater explicitly to
the `IS_ARRAY` case what also avoids triggering a type confusion when
`::TYPE_INT64` is passed as `$type`.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This is used to indicate that the test should not be changed by
automated formatting changes.
|
| |
| |
| |
| | |
Let's see if this helps with spurious failures on Azure.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix bug #76047
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Unlink the current stack frame before freeing CVs or extra args.
This means it will no longer show up in back traces that are
generated during CV destruction.
We already did this prior to destructing the object/closure,
presumably for the same reason.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The following commit introduces a cross-compilation failure:
93c728b77cfb47f5cfdd1863f8982ea59d344205
"Try to control ZEND_MM_ALIGNED_SIZE type"
br-arm-full/build/php-7.4.2/Zend/zend_alloc.h:30:38:
error: missing binary operator before token "8"
^
br-arm-full/build/php-7.4.2/ext/opcache/ZendAccelerator.c:1380:7:
note: in expansion of macro ‘ZEND_MM_ALIGNMENT’
Closes GH-5128.
|
| | |
|
| |
| |
| |
| | |
Op2 is def here, not a use, so treat it accordingly.
|
| |
| |
| |
| |
| | |
We do need to implement get_property_ptr_ptr to make arrays work
correctly.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix #70078: XSL callbacks with nodes as parameter leak memory
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The fix for bug #49634 solved a double-free by copying the node with
`xmlDocCopyNodeList()`, but the copied node is later freed by calling
`xmlFreeNode()` instead of `xmlFreeNodeList()`, thus leaking memory.
However, there is no need to treat the node as node list, i.e. to copy
also the node's siblings; just creating a recursive copy of the node
with `xmlDocCopyNode()` is sufficient, while that also avoids the leak.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix leak in DateTimeImmutable::modify()
|
| | |
|
| |
| |
| |
| | |
Only copy sizeof(zend_internal_function) for internal functions.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Add SKIPIF to test requiring mbregex
|
| | |
|
| |
| |
| |
| |
| | |
Make sure the trampoline is usable, even if we had an unclean
shutdown on the last request.
|
| |
| |
| |
| |
| | |
By nulling out the function_handler, so it will not get used
below. Reuse the existing helper for this purpose.
|
| |
| |
| |
| | |
Ideally "c" would be an unsigned integer...
|
| |
| |
| |
| |
| |
| |
| | |
I replaced it with a multiplication overflow check in
18599f9c52959b2e8cbfac57e278644499a3547d. However, we need both,
because the code for restoring the number can't handle numbers
with many leading zeros right now and I don't feel like teaching it.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix mb_ord() crash if internal encoding not supported
|
| |
| |
| |
| |
| | |
enc_name can be NULL here. Take the name from the mbfl_encoding
instead.
|
| |
| |
| |
| | |
Check for multiplication overflow rather than number of digits.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Reset MBREX(search_re) in RSHUTDOWN
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is going to cause a segfault if reused in the next request.
To illustrate the issue, run these two scripts in sequence with
the built-in server:
// script1.php
mb_ereg_search_init('foobar');
mb_ereg_search('foo');
// script2.php
var_dump(mb_ereg_search_init("foobar"));
var_dump(mb_ereg_search_pos());
|
| | |
|
| |
| |
| |
| |
| | |
As the data structures are public, the fix for 64-bit consists
on replacing the blanket memcpy with individual assignments.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix use of mb_ereg_search_getregs() after invalid pattern
|
| |
| |
| |
| |
| | |
This segfaulted because we assumed that if there are matches,
there must be a regular expression as well.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Don't mix strlen() and ZSTR_LEN(). If the encoding contains a
NULL byte, this will overflow the buffer.
NULL bytes will still make this behave oddly because the consuming
code will cut off the string there, but let's address that in master...
|
| |
| |
| |
| | |
Make sure we don't overflow the integer.
|