Commit Graph

12336 Commits

Author SHA1 Message Date
Xinchen Hui
8555c2bff0 Fixed bug #79536 (zend_clear_exception prevent exception's destructor to be called). 2020-04-29 18:58:28 +08:00
Christoph M. Becker
3151676f52 Fix #79514: Memory leaks while including unexistent file
We have to destroy (un-opened) ZEND_HANDLE_FILENAMEs.
2020-04-24 18:14:53 +02:00
Nicolas Grekas
73d02c3b3e Fix bug #79447
Partially reverts 846b647953: instead of
throwing, this skips uninitialized typed properties when serializing objects.

This makes serialize with __sleep() behave the same as serialize()
without __sleep().

As in the non-__sleep() case, unserialize(serialize($x)) identity
may not be preserved due to replacement of uninitialized/unset
properties with default values. Fixing this will require changes to
the serialization format.

Closes GH-5396.
2020-04-23 10:30:33 +02:00
Christoph M. Becker
c705079b12 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79503: Memory leak on duplicate metadata
2020-04-22 15:08:50 +02:00
Christoph M. Becker
ccca2c448d Fix #79503: Memory leak on duplicate metadata
Duplicate metadata can only happen if someone tampers with the phar, so
we can and should treat that as error.
2020-04-22 15:07:46 +02:00
Christoph M. Becker
225117af71 Upgrade to PCRE2 10.34
We backport the slightly modified variant from master.
2020-04-22 14:23:26 +02:00
Alex Dowad
0d11d37357 Fix bug #67369 ArrayObject serializatino drops the iterator class
When ArrayObject is round-tripped through serialize() and unserialize(),
it forgets any iterator class name which was set using ::setIteratorClass().
Fix that.
2020-04-20 11:55:18 +02:00
Christoph M. Becker
18ad38a7b2 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79491: Search for .user.ini extends up to root dir
2020-04-20 10:58:33 +02:00
Christoph M. Becker
fa10abd6d7 Fix #79491: Search for .user.ini extends up to root dir
The `start` parameter of `php_cgi_ini_activate_user_config` is supposed
to hold the byte offset of the doc root in the given `path`.  However,
the current expression which fixes a potential type incompatibility
will ever only evaluate to zero or one, because it uses the *logical*
and operator (`&&`).  Furthermore we notice that subtracting one from
`doc_root_len` is not necessary, so there is even no need for the
`start` parameter at all.
2020-04-20 10:56:36 +02:00
Nikita Popov
a230b5a6c9 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79497: Fix php_openssl_subtract_timeval()
2020-04-20 10:26:22 +02:00
Joe Cai
94e09bfe55 Fix #79497: Fix php_openssl_subtract_timeval()
I stumbled upon this while debugging a strange issue with
stream_socket_client() where it randomly throws out errors when
the connection timeout is set to below 1s. The logic to calculate
time difference in php_openssl_subtract_timeval() is wrong when
a.tv_usec < b.tv_usec, causing connection errors before the timeout
is reached.
2020-04-20 10:25:54 +02:00
Nikita Popov
0b709e3409 Fix bug #79336
Make reading of floats and doubles host-endian independent.
2020-04-16 12:18:41 +02:00
Nikita Popov
58e6a0a602 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79477
2020-04-15 11:21:42 +02:00
Nikita Popov
79a36ff7f3 Fixed bug #79477
Make sure to deindirect properties when creating array.
2020-04-15 11:21:05 +02:00
Christoph M. Becker
537680a9c4 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add missing CVE
2020-04-14 18:19:34 +02:00
Christoph M. Becker
c4cdf1ae12 Add missing CVE 2020-04-14 18:18:18 +02:00
Nikita Popov
ef56b2c977 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79468
2020-04-14 12:01:51 +02:00
dinosaur
95eaccd0bb Fixed bug #79468
Close the stream filter resources when removing them from the stream.
2020-04-14 11:59:51 +02:00
Christoph M. Becker
a76b3358e4 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add NEWS entries [ci skip]
2020-04-14 08:56:09 +02:00
Christoph M. Becker
8967588702 Add NEWS entries [ci skip] 2020-04-14 08:54:00 +02:00
Nikita Popov
823a956855 Fixed bug #78434
The DO_INIT flag, which will skip the first resume on a primed
generator, should always be set when starting to yield from a
new generator, not only when the yield from happens during priming.
2020-04-09 10:33:11 +02:00
Christoph M. Becker
13c9572a79 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78221: DOMNode::normalize() doesn't remove empty text nodes
2020-04-07 13:07:33 +02:00
Christoph M. Becker
efec22b7be Fix #78221: DOMNode::normalize() doesn't remove empty text nodes
If a text node is not followed by another text node, we remove it, if
its textContent is empty.
2020-04-07 13:04:14 +02:00
Christoph M. Becker
22a077b642 Fix #69264: __debugInfo() ignored while extending SPL classes
We actually implement `::__debugInfo()` and drop the `get_debug_info()`
handlers of all relevant SPL classes.  This is cleaner and gives more
flexibility regarding overriding the functionality in descendant
classes.
2020-04-06 12:01:29 +02:00
Nikita Popov
cf68bc413b Fixed bug #79434 2020-04-02 16:34:03 +02:00
Christoph M. Becker
c065a586d2 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add NEWS entryc [ci skip]
2020-04-01 09:28:39 +02:00
Christoph M. Becker
cc3af6fdea Add NEWS entryc [ci skip] 2020-04-01 09:26:20 +02:00
Derick Rethans
01634f8410 The 7.4 branch is now for 7.4.6 2020-03-31 14:57:12 +01:00
Christoph M. Becker
33226c3a17 Next is 7.3.18 2020-03-31 10:22:55 +02:00
Christoph M. Becker
d533fa15e6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79413: session_create_id() fails for active sessions
2020-03-31 08:39:54 +02:00
Christoph M. Becker
b510250b8e Fix #79413: session_create_id() fails for active sessions
The comment on `PS_VALIDATE_SID_FUNC(files)` is very clear that the
function is supposed to return `SUCCESS` if the session already exists.
So to detect a collision, we have to check for `SUCCESS`, not
`FAILURE`.

We also fix the wrong condition in session_regenerate_id() as well.
2020-03-31 08:38:23 +02:00
Christoph M. Becker
a2f8c78183 Fix #74940: DateTimeZone loose comparison always true
Since `DateTimeZone` does not implement a `compare_objects` handler,
nor has any properties, two `DateTimeZone` instances always compare as
being equal, even if they designate totally different timezones.  Even
worse, after calling `var_dump()` on these objects, the actual
comparison may yield a correct result.

We therefore introduce a `compare_objects` handlers, which prevents
different behavior before/after `var_dump()`, and which allows us to
clearly define the intended semantics.
2020-03-30 09:03:40 +02:00
Christoph M. Becker
6f8045c47f Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79427: Integer Overflow in shmop_open()
2020-03-30 08:57:49 +02:00
Christoph M. Becker
a681b12820 Fix #79427: Integer Overflow in shmop_open()
If `shm.shm_segsz > ZEND_LONG_MAX` the assignment to `shmop->size` a
few lines below would overflow, so we catch that early and bail out if
necessary.
2020-03-30 08:56:49 +02:00
Andre Nathan
0b4e80b8c1 Allow numeric [UG]ID in FPM listen.{owner,group} 2020-03-29 20:20:01 +01:00
Remi Collet
d66a063e0f NEWS 2020-03-29 14:23:28 +02:00
Max Rees
04920645f1 Fix #79424 ext/zip: don't use gl_pathc after call to globfree
This breaks on Linux with the musl libc, since it zeroes out gl_pathc during
globfree.
2020-03-29 14:22:31 +02:00
Dmitry Stogov
91ee85c20c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).
2020-03-25 17:31:33 +03:00
Dmitry Stogov
65120cfc09 Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script). 2020-03-25 17:31:06 +03:00
Nikita Popov
2b3b7f5cd9 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
2020-03-25 10:51:23 +01:00
Christian Schneider
c0840fec9c Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
Closes GH-5292.
2020-03-25 10:50:35 +01:00
Christoph M. Becker
a7bbfc95eb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79200: Some iconv functions cut Windows-1258
2020-03-23 14:13:42 +01:00
Christoph M. Becker
32a2644305 Fix #79200: Some iconv functions cut Windows-1258
To cater to potentially state-dependent encodings, we have to reset the
conversion descriptor into its initial shift state to properly finish
the conversion.  Furthermore, state-dependent encodings may not show
progress when comparing `in_left` before and after the conversion; we
rather have to see whether `out_left` has decreased.  Also we have to
cater to the fact that the final potentially state resetting call does
not signal failure, but we still have to break respective loops
afterwards.
2020-03-23 14:12:37 +01:00
Christoph M. Becker
4576da0aa7 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79393: Null coalescing operator failing with SplFixedArray
2020-03-23 13:31:25 +01:00
Christoph M. Becker
47c745555c Fix #79393: Null coalescing operator failing with SplFixedArray
We favor the KISS principle over optimization[1] – SPL is already
special enough.

[1] <352f3d4476 (r112498098)>ff
2020-03-23 13:29:25 +01:00
Remi Collet
6c0f9c3fc6 NEWS 2020-03-20 11:17:29 +01:00
Remi Collet
51c57a9c67 NEWS 2020-03-20 11:16:08 +01:00
Christoph M. Becker
1d9e716a47 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79396: DateTime hour incorrect during DST jump forward
2020-03-19 08:51:55 +01:00
Nate Brunette
d70058a139 Fix #79396: DateTime hour incorrect during DST jump forward
When you attempt to set the time to a non-existent time occuring during
a DST jump forward, the hour does not move forward correctly.
2020-03-19 08:50:34 +01:00
Christoph M. Becker
1e63900cc0 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix NEWS
2020-03-17 11:12:57 +01:00