1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 23:18:13 +02:00
Commit Graph

126346 Commits

Author SHA1 Message Date
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 76548e5093 Fixed bug #81607 (CE_CACHE allocation with concurrent access) 2021-11-17 18:23:36 +03: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 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 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 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 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 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 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 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
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
Nikita Popov d9ff09a333 Extract code for reporting a zend_fetch_class() error 2021-11-16 14:39:08 +01:00
Christoph M. Becker 25b0906f6a [ci skip] Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  7.3.34 might be next
2021-11-16 13:31:52 +01:00
Christoph M. Becker 8689248a56 [ci skip] Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  7.3.34 might be next
2021-11-16 13:29:23 +01:00
Christoph M. Becker be1cb5a13a [ci skip] Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  7.3.34 might be next
2021-11-16 13:26:05 +01:00
Christoph M. Becker 7d92153182 7.3.34 might be next 2021-11-16 13:24:00 +01:00
Christoph M. Becker 1641e298df [ci skip] Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  [ci skip] Fix news entry for bug #79971
  [ci skip] Update NEWS
2021-11-16 13:16:39 +01:00
Christoph M. Becker b963208640 [ci skip] Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  [ci skip] Fix news entry for bug #79971
  [ci skip] Update NEWS
2021-11-16 13:13:54 +01:00
Christoph M. Becker 8a2076475e [ci skip] Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  [ci skip] Fix news entry for bug #79971
  [ci skip] Update NEWS
2021-11-16 13:11:53 +01:00
Christoph M. Becker d14a9139d5 [ci skip] Fix news entry for bug #79971 2021-11-16 13:06:04 +01:00
Nikita Popov 9e5bddd1eb Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed bug #81626
2021-11-16 12:46:36 +01:00
Nikita Popov 9e25c4b3a6 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #81626
2021-11-16 12:46:20 +01:00
Nikita Popov d26965b247 Fixed bug #81626
Backport of a8926474cb to 7.4.
2021-11-16 12:45:33 +01:00
Nikita Popov 3bea159c59 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Safely reassign array in usort()
2021-11-16 10:16:42 +01:00
Nikita Popov 1c25c556dc Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Safely reassign array in usort()
2021-11-16 10:16:35 +01:00
Nikita Popov 18a0d46a1b Safely reassign array in usort()
Make sure to destroy the old value only after assigning the new
one. Otherwise we may try to double free, e.g. if GC runs during
this dtor.

This caused an assertion failure in phpro/grumphp and is likely
the cause for bug #81603 as well.

(cherry picked from commit 6f38acfaf9)

(I applied this to the wrong base branch at first...)
2021-11-16 10:15:47 +01:00
Nikita Popov 2d14ec9d09 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Safely reassign array in usort()
2021-11-16 10:14:20 +01:00
Nikita Popov 6f38acfaf9 Safely reassign array in usort()
Make sure to destroy the old value only after assigning the new
one. Otherwise we may try to double free, e.g. if GC runs during
this dtor.

This caused an assertion failure in phpro/grumphp and is likely
the cause for bug #81603 as well.
2021-11-16 10:13:46 +01:00
Dmitry Stogov f65144fb74 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Tracing JIT: Fixed abstract stack consistency for [QM_]ASSIGN of CV to itself
2021-11-15 23:26:36 +03:00
Dmitry Stogov fc35a6b93c Tracing JIT: Fixed abstract stack consistency for [QM_]ASSIGN of CV to itself 2021-11-15 23:25:16 +03:00
Dmitry Stogov dca0112917 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Tracing JIT: Fixed failure on non-optimized op_arrays (op_array->T may be above ssa->vars_count)
2021-11-15 14:45:33 +03:00
Dmitry Stogov 85066fd88e Tracing JIT: Fixed failure on non-optimized op_arrays (op_array->T may be above ssa->vars_count) 2021-11-15 14:44:01 +03:00
Dmitry Stogov f313b65acb Optimize closures nested in other closures 2021-11-15 13:32:42 +03:00
Nikita Popov 68ca3879d7 Fix generation of property with class union type
The generated type was missing the UNION bit. Add a ZEND_TYPE_INIT_UNION
macro to hide the implementation details.
2021-11-15 11:04:48 +01:00
Nikita Popov c0441f9377 Replace SKIPIF with EXTENSIONS 2021-11-15 10:45:25 +01:00
Nikita Popov 822047fbb2 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix bug #81618: Correct dns_get_record on FreeBSD
2021-11-15 10:00:55 +01:00
Nikita Popov 4a2656327d Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix bug #81618: Correct dns_get_record on FreeBSD
2021-11-15 10:00:36 +01:00
Matt 45f52285f6 Fix bug #81618: Correct dns_get_record on FreeBSD
Modify dns_get_record to test for records result based on dns_errno to
accommodate modern FreeBSD, for which res_nsearch() does not update
h_errno directly. Add new php_dns_errno macro, and have it consult
statp->res_h_errno when OS has res_nsearch().

Closes GH-7655.
2021-11-15 10:00:07 +01:00
Nikita Popov 267a7b052c Fix new simplexml test
This interacted unfortunately with the addition of the %0 placeholder
in 8.1. Use %r to escape it.
2021-11-15 09:26:25 +01:00
Dmitry Stogov fb582f4230 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed reference-counting inference
2021-11-15 10:40:35 +03:00
Dmitry Stogov 292d76d8a4 JIT: Fixed reference-counting inference 2021-11-15 10:39:58 +03:00
Stanislav Malyshev 7967875d70 [ci skip] Update NEWS 2021-11-14 23:35:26 -08:00
Stanislav Malyshev 9de4eb9e37 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #79971: special character is breaking the path in xml function
2021-11-14 23:29:59 -08:00