Commit Graph

51838 Commits

Author SHA1 Message Date
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
Fabien Villepinte
203308f6c3 Add CONFLICTS tag
These tests can be the reason file_get_contents_variation8.phpt fails times to times.
2019-12-18 11:08:24 +01:00
Christoph M. Becker
4cd6d384bd Fix #78976: SplFileObject::fputcsv returns -1 on failure
`php_stream_write()` returns `-1` on failure now, which has to be
catered to by `SplFileObject::fputcsv()` which still is supposed to
return `false` on failure.
2019-12-17 17:52:18 +01:00
Nikita Popov
dd997a40d0 Avoid float to int cast UB in exif 2019-12-17 13:26:05 +01:00
Stanislav Malyshev
a62154564d Fix test 2019-12-16 10:32:49 -08:00
Stanislav Malyshev
d82a2f6c21 Test fixes 2019-12-16 10:31:22 -08:00
Stanislav Malyshev
6b010b5d86 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix test
  Fix bug #78793
2019-12-16 10:05:02 -08:00
Stanislav Malyshev
6b9af4f5d9 Merge branch 'PHP-7.4' of git.php.net:php-src into PHP-7.4
* 'PHP-7.4' of git.php.net:php-src:
  Remove DateTime class registration test
  Fixed bug #78973
  Fixed bug #78961 (erroneous optimization of re-assigned $GLOBALS)
2019-12-16 10:04:09 -08:00
Stanislav Malyshev
5cb4686753 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix test
  Fix bug #78793
2019-12-16 10:04:03 -08:00
Stanislav Malyshev
6d5cddabaf Fix test 2019-12-16 10:03:43 -08:00
Nikita Popov
8e12f04b5e Remove DateTime class registration test
This test is more annoying than useful.
2019-12-16 18:57:19 +01:00
Dmitry Stogov
6ef7e53c1b Fixed bug #78961 (erroneous optimization of re-assigned $GLOBALS) 2019-12-16 12:24:47 +03:00
Stanislav Malyshev
c14eb8de97 Fix bug #78793 2019-12-16 01:14:58 -08:00
Stanislav Malyshev
c85a877577 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix build - no model field anymore
2019-12-16 01:11:01 -08:00
Stanislav Malyshev
b74a300edf Fix build - no model field anymore 2019-12-16 01:10:42 -08:00
Stanislav Malyshev
d9f57e8316 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #78910
  Fix #78878: Buffer underflow in bc_shift_addsub
  Fix test
  Fix #78862: link() silently truncates after a null byte on Windows
  Fix #78863: DirectoryIterator class silently truncates after a null byte
  Fix #78943: mail() may release string with refcount==1 twice
2019-12-16 00:39:37 -08:00
Stanislav Malyshev
a65b8abf2c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #78910
  Fix #78878: Buffer underflow in bc_shift_addsub
  Fix test
  Fix #78862: link() silently truncates after a null byte on Windows
  Fix #78863: DirectoryIterator class silently truncates after a null byte
2019-12-16 00:38:54 -08:00
Stanislav Malyshev
d348cfb96f Fixed bug #78910 2019-12-16 00:10:39 -08:00
Christoph M. Becker
eb23c60087 Fix #78878: Buffer underflow in bc_shift_addsub
We must not rely on `isdigit()` to detect digits, since we only support
decimal ASCII digits in the following processing.
2019-12-16 00:05:03 -08:00
Stanislav Malyshev
b771a18133 Fix test 2019-12-16 00:03:18 -08:00
Christoph M. Becker
0e6c0654ed Fix #78862: link() silently truncates after a null byte on Windows
Since link() is supposed to accepts paths (i.e. strings without NUL
bytes), we must not accept arbitrary strings.
2019-12-16 00:03:06 -08:00
Christoph M. Becker
a5a15965da Fix #78863: DirectoryIterator class silently truncates after a null byte
Since the constructor of DirectoryIterator and friends is supposed to
accepts paths (i.e. strings without NUL bytes), we must not accept
arbitrary strings.
2019-12-16 00:02:57 -08:00
Nikita Popov
0f2cdbf214 Introduce extra counter to avoid RTD key collisions
Also generate a fatal error if a collision occurs in zend_compile.

This is not perfect, because collisions might still be introduced
via opcache, if one file is included multiple times during a request,
invalidate in the meantime and recompiled by different processes.

This still needs to be addressed, but this patch fixes the much
more common case of collisions occuring when opcache is not used.

Fixes bug #78903.
2019-12-13 11:04:44 +01:00
Nikita Popov
be89a5c7f1 Fixed bug #78950: Preloading trait method with static variables
We need to make sure that trait methods with static variables
allocate a separate MAP slot for the static variables pointer,
rather than working in-place.
2019-12-12 11:52:43 +01:00
Nikita Popov
2d03b638dc Fix handling of non-final loop var free in sccp
We only need to preserve the FE_FREE that marks the end of the
loop range. Skip FE_FREEs with the FREE_ON_RETURN flag.
2019-12-12 09:39:52 +01:00
Nikita Popov
b6a59cee47 Free RSA public key in mysqlnd sha256 auth
Not sure why this only started showing up as a leak now.
2019-12-11 10:31:56 +01:00
Dmitry Stogov
3280209c03 Addirional fix for bug #78918 2019-12-11 12:21:49 +03:00
Dmitry Stogov
20ef51db22 Fixed bug #78937 (Preloading unlinkable anonymous class can segfault) 2019-12-11 00:46:30 +03:00
Dmitry Stogov
518a8f89c1 Fix error message 2019-12-10 22:17:10 +03:00
Nikita Popov
5ddcacac2e Fix incorrect zend_try usage 2019-12-10 15:22:31 +01:00
Nikita Popov
d6f86caa11 Fix release build failure
GCC complained about potentially uninitialized __orig_bailout,
even though the variable has an initializer. This warning was
quite persistent, I was only able to avoid it by using a separate
function.

Am I missing something?
2019-12-10 13:51:09 +01:00
Christoph M. Becker
9e22c3d4d9 Improve error message
Formerly, the error message was like:

| Can't preload unlinked class MyException: Internal parent (Windows
| only limitation)Exception

Now it's like:

| Can't preload unlinked class MyException: Windows can't link to
| internal parent Exception
2019-12-10 13:19:58 +01:00
Nikita Popov
baf3a9133b Add support for class_alias to preloading
Related to bug #78918.
2019-12-10 13:06:36 +01:00
Nikita Popov
3f86adb0ef Fixed bug #78935: Check that all linked classes can be preloaded
During preloading, check that all classes that have been included
as part of the preload script itself (rather than through opcache_compile_file)
can actually be preloaded, i.e. satisfy Windows restrictions, have
resolved initializers and resolved property types. When resolving
initializers and property types, also autoload additional classes.
Because of this, the resolution runs in a loop.
2019-12-10 13:05:48 +01:00
Nikita Popov
4313659bb9 Fix merge mistake 2019-12-10 09:03:44 +01:00
Nikita Popov
7e028a41e2 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix DCE with FE_FETCH
2019-12-10 09:01:18 +01:00
Nikita Popov
87691e74e5 Fix DCE with FE_FETCH
For now, don't treat FE_FETCH op2 as no-val use. See GH-4982.
2019-12-10 09:00:09 +01:00
Christoph M. Becker
505cc77cbe Fix #78912: INTL Support for accounting format
We provide `NumberFormatter::CURRENCY_ACCOUNTING` to wrap
`UNUM_CURRENCY_ACCOUNTING `[1].

[1] <https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/unum_8h.html#a4eb4d3ff13bd506e7078b2be4052266dae97cdd7ed612d07d251021c076efb1c5>
2019-12-09 16:34:56 +01:00
Dmitry Stogov
92c23e1fd3 Call zend_unregister_ini_entries() when unload extension loaded through dl() without MSHUTDOWN callback.
Extensions with MSHUTDOWN should use UNREGISTER_INI_ENTRIES().
2019-12-09 15:05:24 +03:00
Dmitry Stogov
42a2fb8411 Fixed bug #78895 (Reflection detects abstract non-static class as abstract static. IS_IMPLICIT_ABSTRACT is not longer used) 2019-12-09 13:49:12 +03:00
Christoph M. Becker
17a9f1401a Extend CURLFile to support streams
Due to former restrictions of the libcurl API, curl multipart/formdata
file uploads supported only proper files.  However, as of curl 7.56.0
the new `curl_mime_*()` API is available (and already supported by
PHP[1]), which allows us to support arbitrary *seekable* streams, which
is generally desirable, and particularly resolves issues with the
transparent Unicode and long part support on Windows (see bug #77711).

Note that older curl versions are still supported, but CURLFile is
still restricted to proper files in this case.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=a83b68ba56714bfa06737a61af795460caa4a105>

(cherry picked from commit c68dc6b5e3)
2019-12-09 10:30:00 +01:00
Christoph M. Becker
e1202733a5 Use curl_mime_*() functions if available
As of curl 7.56.0, `curl_formadd()` is deprecated in favor of
`curl_mime_*()`, so we use the latter if available.

(cherry picked from commit a83b68ba56)
2019-12-09 10:24:49 +01:00
Christoph M. Becker
aba070e630 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78923: Artifacts when convoluting image with transparency
2019-12-07 12:08:30 +01:00
willson-chen
b5d2cbe027 Fix #78923: Artifacts when convoluting image with transparency
We have to properly initialize `pxl` before using it.

Fix ported from <https://github.com/libgd/libgd/pull/559>.
2019-12-07 12:06:33 +01:00
Nikita Popov
8753975418 Fix intermittent error in pdo_mysql___construct_options.phpt
For the love of god, don't write tests based on mt_rand!
2019-12-06 07:39:54 +01:00
Nikita Popov
6b7cb4a8d7 Fix mysqli ssl tests
First, make sure the tests are skipped if we connect via unix
socket, as we can't use SSL in that case.

Second, use a cipher that is not blacklisted in current MySQL
versions.
2019-12-05 08:38:40 +01:00
Arjen de Korte
ee4295b4ce Fix bug #78823: add zlib library to mysqlnd
The problem is newer binutils will no longer default to --copy-dt-needed-entries but use --no-copy-dt-needed-entries instead. So all libraries needed *must* be provided.

Workarounds (either one works)
1) Add "-Wl,--copy-dt-needed-entries" to LDFLAGS to bring back the old behavior of the linker
2) Add "-lz" to list of libraries to be added

In "ext/mysqlnd/mysqlnd_protocol_frame_codec.c" when the "zlib.h" header is included should also trigger adding '-lz' to the list of libraries.
2019-12-05 07:24:52 +01:00
Nikita Popov
7cbf31a3c7 Preload: Better reason message for internal parents on windows
Related to bug #78881.
2019-12-04 09:52:40 +01:00