Commit Graph

113948 Commits

Author SHA1 Message Date
Christoph M. Becker
cfa9e5e05e Fix useless tests
These tests are certainly not supposed to fail due to a typo in the
class names, but expect this failure.  We fix the typos and the
expectations.
2020-01-09 17:42:22 +01:00
Nikita Popov
b3cc30adf8 Increase select timeout in FPM tester
Let's see if that helps with the recent failure spree on Azure.
2020-01-09 10:19:02 +01:00
Christoph M. Becker
d684f5fdc0 Fix #79086: Bump version not applied
We must not forget to update the version in configure.ac as well.
2020-01-09 09:25:52 +01:00
Christoph M. Becker
b2864b7cfd Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79078: Hypothetical use-after-free in curl_multi_add_handle()
2020-01-08 18:31:38 +01:00
Christoph M. Becker
0dda4a844e 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()`.
2020-01-08 18:29:10 +01:00
Christoph M. Becker
7ea4f0e47e Bump version 2020-01-08 18:26:14 +01:00
Christoph M. Becker
a6d385a8e8 Extract function
As suggested by Nikita[1].

[1] <https://github.com/php/php-src/pull/5045#discussion_r364265013>
2020-01-08 16:55:13 +01:00
Nikita Popov
4b860c06ed Revert "Display a message if select in FPM test timeouts"
This reverts commit e2361498d5.

Ooops, this occurs normally during some tests, but I didn't notice
because I have slow tests disabled...
2020-01-08 16:31:33 +01:00
Nikita Popov
e2361498d5 Display a message if select in FPM test timeouts 2020-01-08 15:57:05 +01:00
Christoph M. Becker
eaa93f6b8a 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.
2020-01-07 15:28:48 +01:00
Christoph M. Becker
896f7533ee Increase sleep() time in test case
Apparently, the former increase to `sleep(2)` helped somewhat, but
still the test fails occassionally.
2020-01-07 14:26:31 +01:00
Christoph M. Becker
1eb2379aa3 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Bump version
2020-01-07 11:10:55 +01:00
Christoph M. Becker
38c0a53b60 Bump version 2020-01-07 11:03:19 +01:00
Nikita Popov
59c3ddab13 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.
2020-01-06 22:41:55 +01:00
Nikita Popov
846b647953 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.
2020-01-06 18:47:27 +01:00
Christoph M. Becker
56306cc4af [ci skip] Merge branch 'PHP-7.3' into PHP-7.4
Empty merge.
2020-01-06 15:33:42 +01:00
Christoph M. Becker
06e78cad83 Revert "Extend CURLFile to support streams"
This reverts commit 17a9f1401a, because
this commit would break ABI, and also due to bug #79013.
We keep the commit for PHP 7.4+, though.
2020-01-06 15:31:49 +01:00
Christoph M. Becker
09ebeba1af Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #54298: Using empty additional_headers adding extraneous CRLF
2020-01-06 14:48:46 +01:00
Christoph M. Becker
ae2150692a 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.
2020-01-06 14:47:23 +01:00
Nikita Popov
68f6ab7113 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.
2020-01-06 10:42:57 +01:00
Christoph M. Becker
74b11e3315 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79068: gdTransformAffineCopy() changes interpolation method
2020-01-06 10:38:22 +01:00
Christoph M. Becker
4bec59f175 Fix #79068: gdTransformAffineCopy() changes interpolation method
We port
<9088591eae>.
2020-01-06 10:36:48 +01:00
Nikita Popov
b59f760472 Fix bug #79063: Curl openssl does not respect PKG_CONFIG_PATH 2020-01-06 10:31:22 +01:00
Nikita Popov
2d29904f25 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.
2020-01-06 10:17:37 +01:00
Christoph M. Becker
f799f42ec8 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79067: gdTransformAffineCopy() may use unitialized values
2020-01-06 09:37:40 +01:00
Christoph M. Becker
2c5860517c Fix #79067: gdTransformAffineCopy() may use unitialized values
We port
<7a06c1669c>.
2020-01-06 09:35:13 +01:00
Christoph M. Becker
f4aa0869ac Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78808: [LMDB] MDB_MAP_FULL: Environment mapsize limit reached
2020-01-03 18:51:07 +01:00
Christoph M. Becker
c05a069adf 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.
2020-01-03 18:49:12 +01:00
Christoph M. Becker
4c6ad099c6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78538: shmop memory leak
2020-01-03 18:13:04 +01:00
Christoph M. Becker
18172303f4 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.
2020-01-03 18:10:29 +01:00
Nikita Popov
7f02b5fc47 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.
2020-01-03 16:49:15 +01:00
Christoph M. Becker
fc6e83e01a 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.
2020-01-03 16:44:53 +01:00
Christoph M. Becker
40b2f82380 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79015: undefined-behavior in php_date.c
2020-01-03 14:32:30 +01:00
Christoph M. Becker
b48f2625b5 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.
2020-01-03 14:31:03 +01:00
Nikita Popov
3e5675d730 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.
2020-01-03 11:53:03 +01:00
Nikita Popov
6f63e05320 Add test for bug #73816
This has been fixed by 0f2cdbf214,
add the test case.
2020-01-03 11:26:31 +01:00
Nikita Popov
3c2fcb717d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #71876
2020-01-03 11:16:14 +01:00
Nikita Popov
1f9e93687c Fixed bug #71876
This is a backport of fcdc0a6db0
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.
2020-01-03 11:14:45 +01:00
Nikita Popov
1dcdcd79ba Fixed bug #79056 2020-01-03 11:08:48 +01:00
Christoph M. Becker
c39b45df72 Add test case for bug #78883
The original test has been provided by divinity76.
2020-01-02 19:28:10 +01:00
Nikita Popov
8abb2ced39 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.
2020-01-02 15:53:15 +01:00
Nikita Popov
48622970fb Extract functions for file cache type serialization
This is already done in master.
2020-01-02 15:16:24 +01:00
Nikita Popov
36d5fbbd6b 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.
2020-01-02 14:56:39 +01:00
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