Tyson Andre
b6419f919a
Micro-optimizations for WeakMap
...
Skip WeakMap lookup check used only for debug assertion in non-debug builds
Use the `zend_hash_lookup` helper to optimize adding a WeakMap entry
if the entry doesn't already exist.
Closes GH-7670
2021-11-20 16:23:31 -05:00
Jakub Zelenka
636e54a1cb
Merge branch 'PHP-8.1'
2021-11-20 20:44:41 +00:00
Jakub Zelenka
79f0e486fd
Merge branch 'PHP-8.0' into PHP-8.1
2021-11-20 20:44:02 +00:00
Jakub Zelenka
2f8407f185
Increase read timeout in FPM process idle test
2021-11-20 20:42:19 +00:00
Jakub Zelenka
fc67967190
Increase script sleep in FPM process idle test
2021-11-20 20:42:19 +00:00
Derick Rethans
f893b55123
Merge branch 'PHP-8.1'
2021-11-18 13:56:07 +00:00
Derick Rethans
e4679ef0c2
Fixed date/diff where the difference in hour is less than 1
2021-11-18 13:55:51 +00:00
Nikita Popov
1845b712e7
Remove commented code in pass1
...
This has been disabled for a long time, and the whole optimization
is no longer relevant given changes in PHP 8.1
2021-11-18 14:51:55 +01:00
Dmitry Stogov
0e1c7243f6
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed a crash becaeuse of race condition in inheritance cache
2021-11-18 14:22:39 +03:00
Dmitry Stogov
5ab2749263
Fixed a crash becaeuse of race condition in inheritance cache
...
zend_inheritance_cache_entry.[num_]warnings must be updated before this entry is made visible to other processes
2021-11-18 14:17:36 +03:00
Nikita Popov
3ded2db0d2
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Update reflection test after stub change
2021-11-18 11:16:51 +01:00
Nikita Popov
36d2d27980
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Update reflection test after stub change
2021-11-18 11:16:35 +01:00
Nikita Popov
e81ad637f4
Update reflection test after stub change
2021-11-18 11:16:13 +01:00
Nikita Popov
f29a409cd8
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Implement __serialize() and __unserialize() on GMP
2021-11-18 11:13:41 +01:00
Nikita Popov
17ceed9ae7
Implement __serialize() and __unserialize() on GMP
...
GMP directly implements internal serialize/unserialize handlers
rather than going through the Serializable interface, so it ended
up being missed when adding the new __serialize()/__unserialize()
methods to other classes.
The serialization format is similar to before, but uses hex instead
of decimal encoding and omits the members if not used (which should
be almost always).
2021-11-18 11:11:52 +01:00
Nikita Popov
2791afbf07
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Clarify that preg_match_all() cannot return null
2021-11-18 10:37:36 +01:00
Nikita Popov
3ec55d6cbf
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Clarify that preg_match_all() cannot return null
2021-11-18 10:37:18 +01:00
Nikita Popov
bc6ec0a109
Clarify that preg_match_all() cannot return null
2021-11-18 10:36:35 +01:00
Nikita Popov
6e982035d0
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Skip test under preloading
2021-11-18 09:34:22 +01:00
Nikita Popov
279d6a4f28
Skip test under preloading
...
In this case we produce additional warnings when preloading
evaluates constants. Possibly we shouldn't be evaluating expressions
with side-effects during preloading, but for now just skip this
test.
2021-11-18 09:33:24 +01:00
Bob Weinand
a8b9dbc632
Fix ZEND_HASH_REVERSE_FOREACH_PTR definition
2021-11-18 00:10:28 +01:00
Dmitry Stogov
11b2cfff5b
Merge branch 'PHP-8.1'
...
* PHP-8.1:
JIT: Fixed memory leak in Zend/tests/concat_002.phpt introduced by fac78ee760
2021-11-17 18:44:55 +03:00
Dmitry Stogov
8965d6b2ab
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fixed memory leak in Zend/tests/concat_002.phpt introduced by fac78ee760
2021-11-17 18:44:34 +03:00
Dmitry Stogov
9dd3e8be8a
JIT: Fixed memory leak in Zend/tests/concat_002.phpt introduced by fac78ee760
2021-11-17 18:43:39 +03:00
Dmitry Stogov
d56ec0a624
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed bug #81607 (CE_CACHE allocation with concurrent access)
2021-11-17 18:25:00 +03:00
Dmitry Stogov
76548e5093
Fixed bug #81607 (CE_CACHE allocation with concurrent access)
2021-11-17 18:23:36 +03:00
Nikita Popov
976f5694d3
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed bug #81631
2021-11-17 16:07:06 +01:00
Nikita Popov
70cb37243e
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed bug #81631
2021-11-17 16:06:50 +01:00
Nikita Popov
4d4fe7639f
Fixed bug #81631
...
We need to save the opline before fetching the operand, as it may
throw an undef var warning.
2021-11-17 16:06:25 +01:00
Nikita Popov
aaba0000d3
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix bug #81630 : Don't claim known hash in getTraitAliases()
Assert hash is known when we claim it is
2021-11-17 15:55:25 +01:00
Nikita Popov
6641e3b8f4
Fix bug #81630 : Don't claim known hash in getTraitAliases()
...
We don't intern this string, and this code is not particularly
performance critical in the first place, so just drop the the
assumption.
2021-11-17 15:54:42 +01:00
Nikita Popov
d0ecc83ab5
Assert hash is known when we claim it is
2021-11-17 15:47:29 +01:00
Nikita Popov
24485aa343
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix inheritance of class constants if mutable data used
2021-11-17 12:24:25 +01:00
Nikita Popov
44e5d25300
Fix inheritance of class constants if mutable data used
...
Class constants from parents should always be directly reused,
rather than re-evaluated as a separate copy. Previously this used
to happen automatically, as we'd just inherit the class constant
entry from the parent class. With mutable data there may now be
a separate copy of the constant, so we need to use that copy
when updating constants. Otherwise we may evaluate the same
constant multiple times.
Closes GH-7658.
2021-11-17 12:23:47 +01:00
Dmitry Stogov
a9db6e7e4a
Merge branch 'PHP-8.1'
...
* PHP-8.1:
JIT: Fixed memory leak
2021-11-17 14:02:17 +03:00
Dmitry Stogov
61b432ca24
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fixed memory leak
2021-11-17 14:02:01 +03:00
Dmitry Stogov
fac78ee760
JIT: Fixed memory leak
2021-11-17 13:59:35 +03:00
Máté Kocsis
d608319529
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Add more specific array return type hints for various extensions - part 2
Add the --generate-optimizer-info option to the help of gen_stub.php
2021-11-17 10:57:01 +01:00
Máté Kocsis
baac970817
Add the --generate-optimizer-info option to the help of gen_stub.php
2021-11-17 10:56:27 +01:00
Máté Kocsis
20fb26e55c
Add more specific array return type hints for various extensions - part 2
...
ext/ftp, ext/gmp, ext/intl
Closes GH-7433
2021-11-17 10:56:27 +01:00
Dmitry Stogov
f34a3d3118
Merge branch 'PHP-8.1'
...
* PHP-8.1:
JIT: Fixed memory lieak
2021-11-17 12:51:32 +03:00
Dmitry Stogov
42ccf9354a
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fixed memory lieak
2021-11-17 12:51:23 +03:00
Dmitry Stogov
48a65fef6f
JIT: Fixed memory lieak
2021-11-17 12:48:56 +03:00
Nikita Popov
372df2de28
Merge branch 'PHP-8.1'
...
* PHP-8.1:
OpenBSD ZTS build fix
2021-11-17 10:20:45 +01:00
Nikita Popov
00405717a1
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
OpenBSD ZTS build fix
2021-11-17 10:20:37 +01:00
David Carlier
fb3e646f6b
OpenBSD ZTS build fix
...
Closes GH-7661.
2021-11-17 10:20:05 +01:00
Nikita Popov
a4da60f4b5
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix leak when persistent PDO connection fails
2021-11-16 16:16:34 +01:00
Nikita Popov
c02aa46126
Fix leak when persistent PDO connection fails
...
As we don't register the resource, the resource dtor is not called
and will not decrement the refcount.
2021-11-16 16:14:29 +01:00
Nikita Popov
f51eb15799
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix bug #81611
Extract code for reporting a zend_fetch_class() error
2021-11-16 14:40:37 +01:00
Cameron Porter
812df2bd8a
Fix bug #81611
...
Add zend_fetch_class_with_scope() which accepts a scope to use for
self/parent, and use that during constant expression evaluation.
Closes GH-7649.
2021-11-16 14:40:06 +01:00