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
Nikita Popov
22e9f9fe4d
Also propagate include exceptions in opcache
2019-12-30 23:22:26 +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
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
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
Sergei Turchanov
c62cd9a43a
Fix #74170 : locale information change after mime_content_type
...
Some functions in libmagic (distributed with fileinfo extension) perform this sequence of calls:
func() {
setlocale(LC_TYPE, "C")
.. do some work ..
setlocale(LC_TYPE, "")
}
It effectively resets LC_TYPE if it that was set before the function call.
To avoid manipulations with current locale at all, the problematic functions
were modified to use locale-independent functions.
2019-12-20 11:22:59 +01:00
Nikita Popov
5155097431
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78402 : pcntl_signal() misleading error message
2019-12-20 11:02:57 +01:00
SATO Kentaro
cbb0efaeeb
Fix #78402 : pcntl_signal() misleading error message
...
An error message can be misleading when a handler
passed to pcntl_signal() is not callable.
2019-12-20 11:02:20 +01:00
Christoph M. Becker
7e05f97fa6
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78983 : pdo_pgsql config.w32 cannot find libpq-fe.h
2019-12-19 13:21:23 +01:00
SATO Kentaro
3e35b08980
Fix #78983 : pdo_pgsql config.w32 cannot find libpq-fe.h
...
When configured with a path specified.
2019-12-19 13:20:43 +01:00
Nikita Popov
e4b12fc62a
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Add destructor annotations in ini parser
2019-12-19 10:43:14 +01:00
Nikita Popov
0f078f6e78
Add destructor annotations in ini parser
...
It would be better to switch this to use %union and %type annotations,
but not going to do that change for 7.3.
2019-12-19 10:43:05 +01:00
Nikita Popov
bd4fce4f6f
Fixed bug #78986
...
Don't assume that handlers live in the arena, they may also be in
SHM.
2019-12-18 11:40:58 +01:00