Nikita Popov
c4f4f1ece7
Share zval_make_interned_string() helper
...
The same function was defined in zend_compile.c and zend_API.c.
2021-07-23 16:10:34 +02:00
Nikita Popov
36d2dd087a
Remove redundant static_members/mutable_data cleanup
...
static_members, mutable_data and static vars in methods are cleaned
up during an earlier shutdown phase (because this has to happen
before we destroy the object store). There is no need to repeat
this cleanup when destroying the classes.
2021-07-23 13:01:40 +02:00
Nikita Popov
89d0115409
Remove zend_cleanup_internal_classes()
...
If fast_shutdown is used, then we don't need to destroy static
members at all. If fast_shutdown is not used, then we already
loop over classes to destroy static members and static variables
in methods.
2021-07-23 12:51:47 +02:00
Nikita Popov
8befb6d84f
Assert that call to method always has called scope or object
2021-07-23 11:26:39 +02:00
Nikita Popov
921e1052db
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix bug #66719
2021-07-23 11:25:17 +02:00
Nikita Popov
90ee1c36d7
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix bug #66719
2021-07-23 11:24:59 +02:00
Nikita Popov
dfd05da97f
Fix bug #66719
...
While parent:: should inherit the called scope, it should only do
so if it is compatible. If there is no called scope, or it is not
a subtype of the scope, we should fall back to the scope.
2021-07-23 11:24:22 +02:00
Nikita Popov
a8926474cb
Set called_scope in __callStatic closure trampoline
2021-07-23 10:58:05 +02:00
Nikita Popov
338a47bb85
Fix bug #63327
...
Use ZEND_MM_ALIGNED_SIZE for the extra size information.
I don't have a relevant system to test, but this should fix the
issue as long as required alignment is detected correctly.
2021-07-23 10:29:44 +02:00
Nikita Popov
5ac55af5e5
Add test for bug #80564
...
This has also been fixed by 3eb97a4566 .
2021-07-23 09:45:39 +02:00
Nikita Popov
3eb97a4566
Always use separate static_members_table
...
When running without opcache, static_members_table is shared with
default_static_members_table. This is visible in reflection output,
because ReflectionProperty::getDefaultValue() will return the
current value, rather than the default value.
Address this by never sharing the table, which matches the behavior
we already see under opcache.
Fixes bug #80821 .
Closes GH-7299.
2021-07-23 09:29:32 +02:00
Máté Kocsis
87c181a0b0
Fix oci8.old_oci_close_semantics deprecation is always displayed
2021-07-22 16:21:46 +02:00
Dmitry Stogov
e1f211f7bb
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed typo
2021-07-22 16:15:44 +03:00
Dmitry Stogov
8fbeebec34
Fixed typo
2021-07-22 16:14:26 +03:00
Dmitry Stogov
9c2b87c3cf
JIT: avoid $this check in closures called from methods
2021-07-22 16:05:43 +03:00
Máté Kocsis
fc56de113c
Add support for generating readonly properties via stubs ( #7297 )
2021-07-22 11:09:10 +02:00
Nikita Popov
8a26cbe0dd
Remove unnecessary PDORow get_method / get_class_name handlers
...
These implement the default behavior, but badly.
2021-07-22 10:40:10 +02:00
Nikita Popov
a5ad9eeefa
Add explicit IntlPartsIterator::getRuleStatus() method
...
Rather than doing a magic forward, explicitly add a forwarding
method. This must be the most frivolous use of get_method I've
ever seen.
2021-07-22 10:33:49 +02:00
Andy Postnikov
bb9ef2bedb
Backport libgd commit
...
Source - https://github.com/libgd/libgd/commit/f6a111c632fcf76dd3a42d750f18d2ed7bf8a5f1
Related to https://github.com/php/php-src/pull/5127#issuecomment-884032991
2021-07-22 09:57:41 +02:00
Nikita Popov
9e787d51b5
Fix typo
...
Did not have intl enabled in this build...
2021-07-22 09:47:45 +02:00
Nikita Popov
578b785ecf
Don't return reference from Fiber::getReturn()
...
Even if the fiber function returns by reference, we must return
a value from Fiber::getReturn() to satisfy the function signature.
Fixes oss-fuzz #36417 .
2021-07-22 09:44:19 +02:00
Nikita Popov
6d505d4445
Add RETURN/RETVAL_COPY_DEREF() macros
...
These were missing from the set...
I think quite a few of these usages don't actually need the DEREF,
but I've just kept things as is for now.
2021-07-22 09:44:19 +02:00
Máté Kocsis
23b1c4a982
Migrate to PHP-Parser 4.12.0 and regenerate some arginfos
2021-07-22 09:40:16 +02:00
Jakub Zelenka
590af4678b
Sync the FPM openmetrics status with php-fpm_exporter
2021-07-21 19:58:36 +01:00
Joe Watkins
bf294d51b4
Extend resource reservation to Fibers ( #7292 )
2021-07-21 20:19:20 +02:00
Dmitry Stogov
713eec75f2
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Added test
2021-07-21 19:43:00 +03:00
Dmitry Stogov
17b5fe13e2
Added test
2021-07-21 19:29:59 +03:00
Dmitry Stogov
a800bc080e
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed bug #81226 (Integer overflow behavior is different with JIT enabled)
2021-07-21 19:29:15 +03:00
Dmitry Stogov
053c56f52e
Fixed bug #81226 (Integer overflow behavior is different with JIT enabled)
2021-07-21 19:28:43 +03:00
Joe Watkins
6ce9836b38
Merge branch 'PHP-8.0'
...
* PHP-8.0:
retry ldap setup a few times in CI
2021-07-21 18:06:38 +02:00
Joe Watkins
0ba6ddefd5
retry ldap setup a few times in CI
2021-07-21 18:06:13 +02:00
Nikita Popov
e2194c18df
FETCH_STATIC_PROP_IS may return undef
...
We don't go out of our way to convert IS_UNDEF to IS_NULL for
this opcode. Reflect this in type info.
2021-07-21 17:19:43 +02:00
Nikita Popov
d1456d1e3c
Print MAY_BE_INDIRECT in dump
2021-07-21 17:19:43 +02:00
Nikita Popov
e3d90fa7de
Transfer MAY_BE_INDIRECT for VERIFY_RETURN
...
If the input is indirect, the output will be indirect too.
2021-07-21 17:19:43 +02:00
Joe Watkins
848b5458d1
more fiber notifications ( #7293 )
2021-07-21 17:18:15 +02:00
Christoph M. Becker
9f18bff6b4
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix #74960 : Heap buffer overflow via str_repeat
2021-07-21 15:36:16 +02:00
Christoph M. Becker
f03e7c845e
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #74960 : Heap buffer overflow via str_repeat
2021-07-21 15:33:17 +02:00
Christoph M. Becker
760ff841a1
Fix #74960 : Heap buffer overflow via str_repeat
...
Trying to allocate a `zend_string` with a length only slighty smaller
than `SIZE_MAX` causes an integer overflow, so callers may need to
check that explicitly. To make that easy in a portable way, we
introduce `ZSTR_MAX_LEN`.
Closes GH-7294.
2021-07-21 15:31:37 +02:00
Dmitry Stogov
9108ac678e
Fixed test
2021-07-21 14:51:36 +03:00
Dmitry Stogov
a3a74b07e5
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed Bug #80959 (infinite loop in building cfg during JIT compilation)
2021-07-21 14:34:04 +03:00
Dmitry Stogov
a9991fbf28
Fixed Bug #80959 (infinite loop in building cfg during JIT compilation)
2021-07-21 14:32:44 +03:00
Nikita Popov
7b85d3bbdd
Add support for verifying optimizer func info
...
This is guarded by -DZEND_VERIFY_FUNC_INFO=1. Enable this on the
variation job.
Closes GH-6924.
2021-07-21 12:24:30 +02:00
Nikita Popov
11b990f848
Forbid multiple readonly modifiers
...
Same as for other modifiers.
2021-07-21 12:19:06 +02:00
Nikita Popov
4a8efc39c1
Set PROFITABILITY_CHECKS=0 on variation job
2021-07-21 11:38:43 +02:00
Nikita Popov
239446c5cf
Merge branch 'PHP-8.0'
...
* PHP-8.0:
dom_import_simplexml() cannot return null
2021-07-21 11:14:03 +02:00
Nikita Popov
a0893865b3
dom_import_simplexml() cannot return null
2021-07-21 11:13:37 +02:00
Nikita Popov
a3f5b11994
Sync JIT overloaded assign/inc/dec overloaded property
...
We should only release the read_property return value if
retval is used, same as in zend_execute.c. This fixes a test
failure under PROFITABILITY_CHECKS=0.
2021-07-21 10:45:02 +02:00
Nikita Popov
a190c7fdb7
Sync JIT zend_check_string_offset()
...
Return after zend_jit_illegal_string_offset() to avoid a redundant
warning during conversion.
This fixes some tests under PROFITABILITY_CHECKS=0.
2021-07-21 10:32:45 +02:00
Nikita Popov
0fb1ccca7c
Add variation job with RC_DEBUG=1
...
This is also intended to test other default-disabled config
options in the future, e.g. PROFITABILITY_CHECKS=0.
2021-07-21 10:08:38 +02:00
Nikita Popov
1602db2d3f
Fix return type of DOMNodeList::item()
...
It can also return DOMNameSpaceNode :(
2021-07-21 09:56:35 +02:00