Nikita Popov
e576d342bb
Update ZCSG(map_ptr_last) only if for_shm
...
Otherwise we may get a memory protection fault here. Updating of
ZCSG(map_ptr_last) is handled when loading from file cache to SHM.
2020-01-02 11:59:36 +01:00
Nikita Popov
90fea67546
Populate hashtable of __sleep() properties
...
Instead of populating a hashtable of property names and then
directly serializing.
This has the advantage of a) detecting duplicate properties more
precisely and b) gives us the ability to discard values without
rewriting the serialization string after the fact for GH-5027.
2020-01-02 11:14:01 +01:00
Nikita Popov
de0ca4734e
Deref names returned by __sleep()
2020-01-02 11:14:00 +01:00
Nikita Popov
701e8c66d1
Extract php_var_serialize_nested_data() function
...
And split code-paths for arrays and objects based on it.
2020-01-02 11:14:00 +01:00
Christoph M. Becker
8d2b20db58
[ci skip] Revert "Add test case for bug #78883 "
...
This reverts commit 09e76cbe6d , because
the test fails reliably on AppVeyor. This needs closer investigation.
2019-12-31 14:27:16 +01:00
Christoph M. Becker
09e76cbe6d
Add test case for bug #78883
...
The actual test has been provided by divinity76.
2019-12-31 13:09:27 +01:00
Christoph M. Becker
4f0e5c8dd9
Remove superfluous compiler option
...
`-fsanitize-address-use-after-scope` is the default as of clang 5.0.0,
and we don't allow to enable ASan for older versions anyway.
2019-12-31 12:00:10 +01:00
Nikita Popov
22e9f9fe4d
Also propagate include exceptions in opcache
2019-12-30 23:22:26 +01:00
Nikita Popov
003be875e4
Make url_stats in resolve_path quiet
...
These stats are used to check whether the file exists -- they
should not generate errors. Having the flag set is particularly
important for custom stream wrappers.
2019-12-30 23:22:26 +01:00
Christoph M. Becker
98df5c97f4
Avoid undefined behavior
2019-12-30 23:17:39 +01:00
Nikita Popov
f77747b06c
Properly propagate url_stat exceptions during include
...
Make sure we abort operations early, and that we don't emit
additional warnings or errors if an exception has been thrown.
2019-12-30 22:56:42 +01:00
Nikita Popov
d1537e506e
Fixed bug #79046
2019-12-30 17:23:53 +01:00
Christoph M. Becker
94063619a0
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #79040 : Warning Opcode handlers are unusable due to ASLR
2019-12-30 15:17:41 +01:00
Christoph M. Becker
0cecf83b26
Fix #79040 : Warning Opcode handlers are unusable due to ASLR
...
We must not use the same shared memory OPcache instance for different
SAPIs, since their memory layout is different. To avoid this, we add
the SAPI name (truncated to at most 20 characters) to the names of the
memory base file, the mutex and the file mapping.
2019-12-30 15:12:58 +01:00
Nikita Popov
fcaf7cbd64
Add test for bug #79031
...
Fixed by preceding revert.
2019-12-30 11:31:27 +01:00
Nikita Popov
ed3811e781
Revert "Increase serialize_lock while decoding session"
...
This reverts commit b8ef7c35ab .
See bug #79031 . The semantics of serialize locking aren't quite
correct right now, and the use of the lock in this particular
place makes us hit the issue in a common case. I'm reverting this
commit for PHP 7.4 and will try to fix this properly for PHP 8,
as I believe it will require ABI breakage.
2019-12-30 11:27:13 +01:00
Christoph M. Becker
935a61d034
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Add missing skipif clause
2019-12-28 11:01:22 +01:00
Christoph M. Becker
1aa419dcdc
Add missing skipif clause
2019-12-28 11:00:37 +01:00
Christoph M. Becker
6d1dff6f3d
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #79033 : Curl timeout error with specific url and post
2019-12-28 10:48:59 +01:00
Christoph M. Becker
c47b18a222
Fix #79033 : Curl timeout error with specific url and post
...
We must not set an empty mime structure as `CURLOPT_MIMEPOST`; instead
we set it to `NULL` if `CURLOPT_POSTFIELDS` has been set to an empty
array.
2019-12-28 10:47:03 +01:00
Nikita Popov
32cd373dfd
Handle empty password fast path in caching_sha2_password
...
If an empty password is used, no additional packets are exchanged
during caching_sha2_password auth. We're only looking for an
OK/ERR response.
2019-12-27 17:27:45 +01:00
Nikita Popov
813d4a00b4
Handle error response during caching_sha2_password auth
...
In particular, this fixes handling of expired passwords.
2019-12-27 17:27:45 +01:00
Nikita Popov
e7e1254f3e
Add support for caching_sha2_password in change user authentication
...
Same as for connection handshakes.
2019-12-27 17:27:45 +01:00
Nikita Popov
03ee36d1c5
Fix unix socket check during caching_sha2_password
...
The fact that conn->unix_socket is set does not mean that a Unix
socket is actually in use -- this member is set in a default
configuration.
Instead check whether a unix_socket stream ops is used.
2019-12-27 17:27:41 +01:00
Nikita Popov
6225137b4a
Support auth switch request during caching sha2 auth
2019-12-27 17:27:04 +01:00
Nikita Popov
b0efd18f78
Don't use PASSWORD() function in test
...
Doesn't exist anymore in MySQL 8.
2019-12-27 17:26:15 +01:00
Nikita Popov
248c783e7d
Specify explicit row order in PDO MySQL test
2019-12-27 17:25:58 +01:00
Nikita Popov
23d4659635
Skip bug77956.phpt if local_infile disabled on server
2019-12-27 17:25:53 +01:00
Nikita Popov
6572d9149d
Don't check TIMESTAMP NOT NULL in fetch_field_flags test
...
The behavior of this is very dependent on the MySQL vendor, MySQL
version and MySQL configuration, in particular the
explicit_defaults_for_timestamp variable.
I don't think it's worthwhile to try and model this exactly, so
drop the test.
2019-12-27 17:25:23 +01:00
Nikita Popov
c4cbdfa99c
Don't test the RENAME DATABASE query
...
Apparently this only existed for a short time, because it was
found to be insecure. Don't try to test it.
2019-12-27 17:25:12 +01:00
Nikita Popov
f97806726f
Make GeomFromText tests compatible with MySQL 8
...
The function has been renamed to ST_GeomFromText.
2019-12-27 17:25:01 +01:00
Christoph M. Becker
58cc66e175
Skip test for clang builds
...
On Windows, clang builds don't use __vectorcall, so executing this test
does not make sense.
2019-12-27 15:09:19 +01:00
Christoph M. Becker
1b0a79ab3f
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fixed bug #79029 (Use After Free's in XMLReader / XMLWriter).
2019-12-25 12:35:44 +01:00
Xinchen Hui
27bb3289ac
Fixed bug #79029 (Use After Free's in XMLReader / XMLWriter).
...
We backport the fix PHP 7.3, since this branch is affected as well.
(cherry picked from commit b5e0043796 )
(cherry picked from commit e36daa6927 )
(cherry picked from commit 2704ee6844 )
2019-12-25 12:33:30 +01:00
Christoph M. Becker
2704ee6844
Fix test case
...
As of PHP 7.3.0, unlinking files with open handles is possible on
Windows, but these file entries are still blocked until all open
handles are closed. Since this test doesn't require to write to the
same file, we use three separate files.
We also add the missing skip check for XMLReader.
2019-12-25 12:07:54 +01:00
Xinchen Hui
e36daa6927
Fixed bug #79029 (Use After Free's in XMLReader / XMLWriter).
2019-12-25 15:55:15 +08:00
Xinchen Hui
4c6e170c57
Revert "Fixed bug #79029 (Use After Free's in XMLReader / XMLWriter)"
...
This reverts commit d8ad2f4695 .
2019-12-25 15:27:10 +08:00
Xinchen Hui
d8ad2f4695
Fixed bug #79029 (Use After Free's in XMLReader / XMLWriter)
2019-12-25 13:14:08 +08:00
Xinchen Hui
b5e0043796
Partial fix for bug #79029
2019-12-25 12:43:44 +08:00
Xinchen Hui
f09b958e90
Similar problem ( #79022 ) also exists in Interfaces
2019-12-24 14:20:55 +08:00
Xinchen Hui
153c9cc346
Fixed bug #79022 (class_exists returns True for classes that are not ready to be used)
2019-12-24 14:04:19 +08:00
Nikita Popov
b829ea5f74
Fix leak when generator closed during yield in finally
...
In this case we need to free any pending exceptions or return values
that will be discarded.
2019-12-20 17:46:31 +01:00
Christoph M. Becker
6ec4056928
Fix #79008 : General performance regression with PHP 7.4 on Windows
...
We no longer try to retrieve the filename of a given stream when
fstat'ing, because this is very slow. Since we neither didn't do that
in PHP 7.3 and earlier, we regard this as sensible trade-off.
2019-12-20 16:28:11 +01:00
Nikita Popov
d5c55f81ec
Try to make proc_open_bug69900.phpt more robust
2019-12-20 13:51:31 +01:00
Nikita Popov
b0737fa35e
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78982 : pdo_pgsql returns dead persistent connection
2019-12-20 12:06:05 +01:00
SATO Kentaro
37d11d123e
Fix #78982 : pdo_pgsql returns dead persistent connection
...
Call PQconsumeInput() before PQstatus() to update the status.
2019-12-20 12:05:17 +01:00
Nikita Popov
f974f252dd
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78980 : pgsqlGetNotify() overlooks dead connection
2019-12-20 11:45:16 +01:00
SATO Kentaro
7e39e6934d
Fix #78980 : pgsqlGetNotify() overlooks dead connection
...
pgsqlGetNotify() didn't check result of PQconsumeInput().
2019-12-20 11:44:07 +01:00
Nikita Popov
10eb0b3110
Fixed bug #79000
...
Don't report EAGAIN/EWOULDBLOCK as errors for fwrite on
non-blocking socket streams. This matches behavior for fread,
as well as behavior for plain file streams.
Closes GH-5026.
2019-12-20 11:37:43 +01:00
Nikita Popov
d4ba1fd963
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #74170 : locale information change after mime_content_type
2019-12-20 11:24:03 +01:00