]> granicus.if.org Git - php/log
php
5 years agoIncrease select timeout in FPM tester
Nikita Popov [Thu, 9 Jan 2020 09:19:02 +0000 (10:19 +0100)]
Increase select timeout in FPM tester

Let's see if that helps with the recent failure spree on Azure.

5 years agoFix #79086: Bump version not applied
Christoph M. Becker [Thu, 9 Jan 2020 08:19:52 +0000 (09:19 +0100)]
Fix #79086: Bump version not applied

We must not forget to update the version in configure.ac as well.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 8 Jan 2020 17:31:10 +0000 (18:31 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79078: Hypothetical use-after-free in curl_multi_add_handle()

5 years agoFix #79078: Hypothetical use-after-free in curl_multi_add_handle()
Christoph M. Becker [Wed, 8 Jan 2020 10:52:24 +0000 (11:52 +0100)]
Fix #79078: Hypothetical use-after-free in curl_multi_add_handle()

To avoid this, we have to verify the handlers already in
`curl_multi_add_handle()`, not only in `curl_multi_exec()`.

5 years agoBump version
Christoph M. Becker [Wed, 8 Jan 2020 17:26:14 +0000 (18:26 +0100)]
Bump version

5 years agoExtract function
Christoph M. Becker [Wed, 8 Jan 2020 15:54:31 +0000 (16:54 +0100)]
Extract function

As suggested by Nikita[1].

[1] <https://github.com/php/php-src/pull/5045#discussion_r364265013>

5 years agoRevert "Display a message if select in FPM test timeouts"
Nikita Popov [Wed, 8 Jan 2020 15:31:33 +0000 (16:31 +0100)]
Revert "Display a message if select in FPM test timeouts"

This reverts commit e2361498d519561e7eb5b73d138c1eaa80da2a20.

Ooops, this occurs normally during some tests, but I didn't notice
because I have slow tests disabled...

5 years agoDisplay a message if select in FPM test timeouts
Nikita Popov [Wed, 8 Jan 2020 14:56:37 +0000 (15:56 +0100)]
Display a message if select in FPM test timeouts

5 years agoMake test more resilient
Christoph M. Becker [Tue, 7 Jan 2020 14:28:48 +0000 (15:28 +0100)]
Make test more resilient

Depending on the libcurl version and perhaps configuration, it may show
additional info (due to `CURLOPT_VERBOSE` being activated), which we
have to ignore, to avoid spurious test failures.

5 years agoIncrease sleep() time in test case
Christoph M. Becker [Tue, 7 Jan 2020 13:24:55 +0000 (14:24 +0100)]
Increase sleep() time in test case

Apparently, the former increase to `sleep(2)` helped somewhat, but
still the test fails occassionally.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 7 Jan 2020 10:10:55 +0000 (11:10 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Bump version

5 years agoBump version
Christoph M. Becker [Tue, 7 Jan 2020 10:03:19 +0000 (11:03 +0100)]
Bump version

5 years agoRemove support for preloading on Windows
Nikita Popov [Tue, 10 Dec 2019 13:29:58 +0000 (14:29 +0100)]
Remove support for preloading on Windows

Due to ASLR restrictions, preloading on Windows does not work with
any code that has preloading dependencies on internal classes.
This effectively makes it unusable for any non-trivial codebase.

Instead of pretending like preloading is going to work, only to
make people realize that it really doesn't once they get beyond
a dummy example, we disable support for preloading on Windows
entirely.

Closes GH-4999.

5 years agoThrow Error when referencing uninit typed prop in __sleep
Nikita Popov [Fri, 3 Jan 2020 14:35:10 +0000 (15:35 +0100)]
Throw Error when referencing uninit typed prop in __sleep

Previously this generated a notice, but would likely generate an
Error when unserializing.

Now we treat it with the same distinction as direct property
accesses, i.e. referencing an unset/undefined normal property
stays a notice, while a typed property becomes an Error exception.

This fixed bug #79002.

Closes GH-5050.

5 years ago[ci skip] Merge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 6 Jan 2020 14:32:40 +0000 (15:32 +0100)]
[ci skip] Merge branch 'PHP-7.3' into PHP-7.4

Empty merge.

5 years agoRevert "Extend CURLFile to support streams"
Christoph M. Becker [Mon, 6 Jan 2020 14:19:34 +0000 (15:19 +0100)]
Revert "Extend CURLFile to support streams"

This reverts commit 17a9f1401aeb35fe1e3657b38102a410d151d42f, because
this commit would break ABI, and also due to bug #79013.
We keep the commit for PHP 7.4+, though.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 6 Jan 2020 13:48:22 +0000 (14:48 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #54298: Using empty additional_headers adding extraneous CRLF

5 years agoFix #54298: Using empty additional_headers adding extraneous CRLF
Christoph M. Becker [Sun, 5 Jan 2020 14:15:09 +0000 (15:15 +0100)]
Fix #54298: Using empty additional_headers adding extraneous CRLF

If the header string is empty, we pass `NULL` to `php_mail()` to avoid
further checks on the string length.

5 years agoDon't link against openssl 1.1 in curl
Nikita Popov [Mon, 6 Jan 2020 09:40:43 +0000 (10:40 +0100)]
Don't link against openssl 1.1 in curl

OpenSSL 1.1 does not need crypto locking callbacks, so avoid
detecting and linking against it in the first place.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 6 Jan 2020 09:38:08 +0000 (10:38 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79068: gdTransformAffineCopy() changes interpolation method

5 years agoFix #79068: gdTransformAffineCopy() changes interpolation method
Christoph M. Becker [Mon, 6 Jan 2020 09:33:47 +0000 (10:33 +0100)]
Fix #79068: gdTransformAffineCopy() changes interpolation method

We port
<https://github.com/libgd/libgd/commit/9088591eae437358ee5b929adf82865e37e3001e>.

5 years agoFix bug #79063: Curl openssl does not respect PKG_CONFIG_PATH
Nikita Popov [Mon, 6 Jan 2020 09:29:41 +0000 (10:29 +0100)]
Fix bug #79063: Curl openssl does not respect PKG_CONFIG_PATH

5 years agoClean up curl openssl check
Nikita Popov [Mon, 6 Jan 2020 09:16:42 +0000 (10:16 +0100)]
Clean up curl openssl check

Only set HAVE_CURL_OPENSSL flag, and remove Windows specific code,
as all of this is only relevant for OpenSSL < 1.1, which is not
used on Windows.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 6 Jan 2020 08:36:49 +0000 (09:36 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79067: gdTransformAffineCopy() may use unitialized values

5 years agoFix #79067: gdTransformAffineCopy() may use unitialized values
Christoph M. Becker [Mon, 6 Jan 2020 08:35:13 +0000 (09:35 +0100)]
Fix #79067: gdTransformAffineCopy() may use unitialized values

We port
<https://github.com/libgd/libgd/commit/7a06c1669c563917bc48c464521e3de962ddb4e8>.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 3 Jan 2020 17:49:36 +0000 (18:49 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78808: [LMDB] MDB_MAP_FULL: Environment mapsize limit reached

5 years agoFix #78808: [LMDB] MDB_MAP_FULL: Environment mapsize limit reached
Christoph M. Becker [Thu, 14 Nov 2019 10:21:41 +0000 (11:21 +0100)]
Fix #78808: [LMDB] MDB_MAP_FULL: Environment mapsize limit reached

We implement support for a fifth parameter, which allows to specify the
mapsize.  The parameter defaults to zero, in which case the compiled in
default mapsize (usually 1048576) will be used.  The mapsize should be
a multiple of the page size of the OS.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 3 Jan 2020 17:12:41 +0000 (18:12 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78538: shmop memory leak

5 years agoFix #78538: shmop memory leak
Christoph M. Becker [Mon, 25 Nov 2019 13:05:15 +0000 (14:05 +0100)]
Fix #78538: shmop memory leak

If the descriptor's refcount drops to zero, we have to unmap the
respective file view, to avoid leaking memory.

5 years agoSlightly increase tolerance in time_sleep_until() test
Nikita Popov [Fri, 3 Jan 2020 15:48:06 +0000 (16:48 +0100)]
Slightly increase tolerance in time_sleep_until() test

With the 1ms tolerance this still occasionally fails on macos.
I love macos. It always works and causes no problems at all.

5 years agoTry to fix intermittently failing test case
Christoph M. Becker [Fri, 3 Jan 2020 15:44:53 +0000 (16:44 +0100)]
Try to fix intermittently failing test case

This test fails intermittently due to taskill reporting failure to kill
the process (because it already has been terminated).  We increase the
sleep time, to hopefully prevent that from happening again.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 3 Jan 2020 13:32:04 +0000 (14:32 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79015: undefined-behavior in php_date.c

5 years agoFix #79015: undefined-behavior in php_date.c
Christoph M. Becker [Mon, 23 Dec 2019 13:42:54 +0000 (14:42 +0100)]
Fix #79015: undefined-behavior in php_date.c

We check that the given microsecond fraction is in the valid range
[0, 1000000[, and otherwise mark it as invalid.  We also drop the
useless do loop; a plain block is sufficient here.

5 years agoRemove unnecessary strncpy in zip
Nikita Popov [Fri, 3 Jan 2020 10:51:46 +0000 (11:51 +0100)]
Remove unnecessary strncpy in zip

This causes a warning on GCC 9 and is unnecessary to boot: We
only use "cwd" for the open_basedir check, so we can just as well
pass in the original string.

5 years agoAdd test for bug #73816
Nikita Popov [Fri, 3 Jan 2020 10:26:31 +0000 (11:26 +0100)]
Add test for bug #73816

This has been fixed by 0f2cdbf214efd98b4bdaf5ca41728faf00e7c037,
add the test case.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 3 Jan 2020 10:16:14 +0000 (11:16 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #71876

5 years agoFixed bug #71876
Nikita Popov [Fri, 3 Jan 2020 10:14:45 +0000 (11:14 +0100)]
Fixed bug #71876

This is a backport of fcdc0a6db0ae63fbed9e3828137b899b844623ce
to the PHP-7.3 branch. We need to make sure that OnUpdateString
is also called for a NULL value, otherwise the reset of the encoding
at the end of the request will not work.

5 years agoFixed bug #79056
Nikita Popov [Fri, 3 Jan 2020 09:40:51 +0000 (10:40 +0100)]
Fixed bug #79056

5 years agoAdd test case for bug #78883
Christoph M. Becker [Thu, 2 Jan 2020 18:25:31 +0000 (19:25 +0100)]
Add test case for bug #78883

The original test has been provided by divinity76.

5 years agoFixed bug #79055
Nikita Popov [Thu, 2 Jan 2020 14:50:44 +0000 (15:50 +0100)]
Fixed bug #79055

Fix file cache serialization of property types. I'm changing the
overall type serialization format to perform additional adjustments
in order to yield a plausible pointer for zend_type, rather than
using an entirely separate serialization format, as was previously
done. That would have been annoying to extend to the case of CE
pointers.

5 years agoExtract functions for file cache type serialization
Nikita Popov [Thu, 2 Jan 2020 14:16:24 +0000 (15:16 +0100)]
Extract functions for file cache type serialization

This is already done in master.

5 years agoFix file cache run_time_cache unserialization
Nikita Popov [Thu, 2 Jan 2020 13:56:39 +0000 (14:56 +0100)]
Fix file cache run_time_cache unserialization

If the script was serialized as file_cache_only (thus non-immutable)
and then gets unserialized into SHM, we need to allocate a new
run_time_cache slot and can't use the serialized arena pointer.

5 years agoUpdate ZCSG(map_ptr_last) only if for_shm
Nikita Popov [Thu, 2 Jan 2020 10:59:36 +0000 (11:59 +0100)]
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.

5 years agoPopulate hashtable of __sleep() properties
Nikita Popov [Thu, 2 Jan 2020 10:11:01 +0000 (11:11 +0100)]
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.

5 years agoDeref names returned by __sleep()
Nikita Popov [Thu, 2 Jan 2020 09:52:50 +0000 (10:52 +0100)]
Deref names returned by __sleep()

5 years agoExtract php_var_serialize_nested_data() function
Nikita Popov [Thu, 2 Jan 2020 09:43:01 +0000 (10:43 +0100)]
Extract php_var_serialize_nested_data() function

And split code-paths for arrays and objects based on it.

5 years ago[ci skip] Revert "Add test case for bug #78883"
Christoph M. Becker [Tue, 31 Dec 2019 13:26:52 +0000 (14:26 +0100)]
[ci skip] Revert "Add test case for bug #78883"

This reverts commit 09e76cbe6d73399f3476942e7502de0bdbf65fa2, because
the test fails reliably on AppVeyor.  This needs closer investigation.

5 years agoAdd test case for bug #78883
Christoph M. Becker [Tue, 31 Dec 2019 12:02:05 +0000 (13:02 +0100)]
Add test case for bug #78883

The actual test has been provided by divinity76.

5 years agoRemove superfluous compiler option
Christoph M. Becker [Tue, 31 Dec 2019 10:50:24 +0000 (11:50 +0100)]
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.

5 years agoAlso propagate include exceptions in opcache
Nikita Popov [Mon, 30 Dec 2019 22:21:32 +0000 (23:21 +0100)]
Also propagate include exceptions in opcache

5 years agoMake url_stats in resolve_path quiet
Nikita Popov [Mon, 30 Dec 2019 22:06:12 +0000 (23:06 +0100)]
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.

5 years agoAvoid undefined behavior
Christoph M. Becker [Mon, 30 Dec 2019 22:13:39 +0000 (23:13 +0100)]
Avoid undefined behavior

5 years agoProperly propagate url_stat exceptions during include
Nikita Popov [Mon, 30 Dec 2019 21:47:38 +0000 (22:47 +0100)]
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.

5 years agoFixed bug #79046
Nikita Popov [Mon, 30 Dec 2019 16:22:50 +0000 (17:22 +0100)]
Fixed bug #79046

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 30 Dec 2019 14:17:03 +0000 (15:17 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79040: Warning Opcode handlers are unusable due to ASLR

5 years agoFix #79040: Warning Opcode handlers are unusable due to ASLR
Christoph M. Becker [Mon, 30 Dec 2019 11:20:31 +0000 (12:20 +0100)]
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.

5 years agoAdd test for bug #79031
Nikita Popov [Mon, 30 Dec 2019 10:31:27 +0000 (11:31 +0100)]
Add test for bug #79031

Fixed by preceding revert.

5 years agoRevert "Increase serialize_lock while decoding session"
Nikita Popov [Mon, 30 Dec 2019 10:27:13 +0000 (11:27 +0100)]
Revert "Increase serialize_lock while decoding session"

This reverts commit b8ef7c35abd31666d9fb317db4b09a9eef0ede6c.

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.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sat, 28 Dec 2019 10:01:22 +0000 (11:01 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Add missing skipif clause

5 years agoAdd missing skipif clause
Christoph M. Becker [Sat, 28 Dec 2019 10:00:37 +0000 (11:00 +0100)]
Add missing skipif clause

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sat, 28 Dec 2019 09:47:52 +0000 (10:47 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79033: Curl timeout error with specific url and post

5 years agoFix #79033: Curl timeout error with specific url and post
Christoph M. Becker [Sat, 28 Dec 2019 09:47:03 +0000 (10:47 +0100)]
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.

5 years agoHandle empty password fast path in caching_sha2_password
Nikita Popov [Fri, 27 Dec 2019 15:17:10 +0000 (16:17 +0100)]
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.

5 years agoHandle error response during caching_sha2_password auth
Nikita Popov [Fri, 27 Dec 2019 15:07:28 +0000 (16:07 +0100)]
Handle error response during caching_sha2_password auth

In particular, this fixes handling of expired passwords.

5 years agoAdd support for caching_sha2_password in change user authentication
Nikita Popov [Fri, 27 Dec 2019 13:40:54 +0000 (14:40 +0100)]
Add support for caching_sha2_password in change user authentication

Same as for connection handshakes.

5 years agoFix unix socket check during caching_sha2_password
Nikita Popov [Fri, 27 Dec 2019 12:27:10 +0000 (13:27 +0100)]
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.

5 years agoSupport auth switch request during caching sha2 auth
Nikita Popov [Fri, 27 Dec 2019 11:37:51 +0000 (12:37 +0100)]
Support auth switch request during caching sha2 auth

5 years agoDon't use PASSWORD() function in test
Nikita Popov [Fri, 27 Dec 2019 15:21:21 +0000 (16:21 +0100)]
Don't use PASSWORD() function in test

Doesn't exist anymore in MySQL 8.

5 years agoSpecify explicit row order in PDO MySQL test
Nikita Popov [Fri, 27 Dec 2019 15:39:46 +0000 (16:39 +0100)]
Specify explicit row order in PDO MySQL test

5 years agoSkip bug77956.phpt if local_infile disabled on server
Nikita Popov [Fri, 27 Dec 2019 15:31:34 +0000 (16:31 +0100)]
Skip bug77956.phpt if local_infile disabled on server

5 years agoDon't check TIMESTAMP NOT NULL in fetch_field_flags test
Nikita Popov [Fri, 27 Dec 2019 13:02:18 +0000 (14:02 +0100)]
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.

5 years agoDon't test the RENAME DATABASE query
Nikita Popov [Fri, 27 Dec 2019 12:45:00 +0000 (13:45 +0100)]
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.

5 years agoMake GeomFromText tests compatible with MySQL 8
Nikita Popov [Fri, 27 Dec 2019 12:38:14 +0000 (13:38 +0100)]
Make GeomFromText tests compatible with MySQL 8

The function has been renamed to ST_GeomFromText.

5 years agoSkip test for clang builds
Christoph M. Becker [Fri, 27 Dec 2019 14:01:09 +0000 (15:01 +0100)]
Skip test for clang builds

On Windows, clang builds don't use __vectorcall, so executing this test
does not make sense.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 25 Dec 2019 11:34:47 +0000 (12:34 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79029 (Use After Free's in XMLReader / XMLWriter).

5 years agoFixed bug #79029 (Use After Free's in XMLReader / XMLWriter).
Xinchen Hui [Wed, 25 Dec 2019 11:05:44 +0000 (12:05 +0100)]
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 b5e004379647bd1ebb75eb2eac8826fb6abdd3d8)
(cherry picked from commit e36daa6927c05d2e687bb77495ef206cde118b33)
(cherry picked from commit 2704ee6844c03348de9d15e74646d09007ef0f7c)

5 years agoFix test case
Christoph M. Becker [Wed, 25 Dec 2019 11:05:44 +0000 (12:05 +0100)]
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.

5 years agoFixed bug #79029 (Use After Free's in XMLReader / XMLWriter).
Xinchen Hui [Wed, 25 Dec 2019 07:55:15 +0000 (15:55 +0800)]
Fixed bug #79029 (Use After Free's in XMLReader / XMLWriter).

5 years agoRevert "Fixed bug #79029 (Use After Free's in XMLReader / XMLWriter)"
Xinchen Hui [Wed, 25 Dec 2019 07:27:10 +0000 (15:27 +0800)]
Revert "Fixed bug #79029 (Use After Free's in XMLReader / XMLWriter)"

This reverts commit d8ad2f4695ebd6dc2d4e668d9baeac1c071791a6.

5 years agoFixed bug #79029 (Use After Free's in XMLReader / XMLWriter)
Xinchen Hui [Wed, 25 Dec 2019 05:14:08 +0000 (13:14 +0800)]
Fixed bug #79029 (Use After Free's in XMLReader / XMLWriter)

5 years agoPartial fix for bug #79029
Xinchen Hui [Wed, 25 Dec 2019 04:43:44 +0000 (12:43 +0800)]
Partial fix for bug #79029

5 years agoSimilar problem (#79022) also exists in Interfaces
Xinchen Hui [Tue, 24 Dec 2019 06:20:55 +0000 (14:20 +0800)]
Similar problem (#79022) also exists in Interfaces

5 years agoFixed bug #79022 (class_exists returns True for classes that are not ready to be...
Xinchen Hui [Tue, 24 Dec 2019 06:04:19 +0000 (14:04 +0800)]
Fixed bug #79022 (class_exists returns True for classes that are not ready to be used)

5 years agoFix leak when generator closed during yield in finally
Nikita Popov [Fri, 20 Dec 2019 15:15:24 +0000 (16:15 +0100)]
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.

5 years agoFix #79008: General performance regression with PHP 7.4 on Windows
Christoph M. Becker [Fri, 20 Dec 2019 15:23:32 +0000 (16:23 +0100)]
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.

5 years agoTry to make proc_open_bug69900.phpt more robust
Nikita Popov [Fri, 20 Dec 2019 12:51:31 +0000 (13:51 +0100)]
Try to make proc_open_bug69900.phpt more robust

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 20 Dec 2019 11:05:39 +0000 (12:05 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78982: pdo_pgsql returns dead persistent connection

5 years agoFix #78982: pdo_pgsql returns dead persistent connection
SATO Kentaro [Tue, 17 Dec 2019 17:36:03 +0000 (02:36 +0900)]
Fix #78982: pdo_pgsql returns dead persistent connection

Call PQconsumeInput() before PQstatus() to update the status.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 20 Dec 2019 10:44:23 +0000 (11:44 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78980: pgsqlGetNotify() overlooks dead connection

5 years agoFix #78980: pgsqlGetNotify() overlooks dead connection
SATO Kentaro [Tue, 17 Dec 2019 17:16:55 +0000 (02:16 +0900)]
Fix #78980: pgsqlGetNotify() overlooks dead connection

pgsqlGetNotify() didn't check result of PQconsumeInput().

5 years agoFixed bug #79000
Nikita Popov [Thu, 19 Dec 2019 12:27:09 +0000 (13:27 +0100)]
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.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 20 Dec 2019 10:24:03 +0000 (11:24 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #74170: locale information change after mime_content_type

5 years agoFix #74170: locale information change after mime_content_type
Sergei Turchanov [Thu, 29 Aug 2019 07:29:19 +0000 (17:29 +1000)]
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.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 20 Dec 2019 10:02:57 +0000 (11:02 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78402: pcntl_signal() misleading error message

5 years agoFix #78402: pcntl_signal() misleading error message
SATO Kentaro [Tue, 17 Dec 2019 19:03:42 +0000 (04:03 +0900)]
Fix #78402: pcntl_signal() misleading error message

An error message can be misleading when a handler
passed to pcntl_signal() is not callable.

5 years agoFix early free of assign_obj op_data
Nikita Popov [Fri, 20 Dec 2019 09:33:18 +0000 (10:33 +0100)]
Fix early free of assign_obj op_data

We need to make sure that op_data is only freed after populating
result, as op_data may be the only thing holding the value in the
case of an overloaded assignment.

This reverts the code to how it looked like in 7.3.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Dmitry Stogov [Thu, 19 Dec 2019 20:17:39 +0000 (23:17 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #78999 (Cycle leak when using function result as temporary)

5 years agoFixed bug #78999 (Cycle leak when using function result as temporary)
Dmitry Stogov [Thu, 19 Dec 2019 20:11:08 +0000 (23:11 +0300)]
Fixed bug #78999 (Cycle leak when using function result as temporary)

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 19 Dec 2019 12:21:05 +0000 (13:21 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78983: pdo_pgsql config.w32 cannot find libpq-fe.h

5 years agoFix #78983: pdo_pgsql config.w32 cannot find libpq-fe.h
SATO Kentaro [Tue, 17 Dec 2019 17:47:08 +0000 (02:47 +0900)]
Fix #78983: pdo_pgsql config.w32 cannot find libpq-fe.h

When configured with a path specified.