1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Commit Graph

122379 Commits

Author SHA1 Message Date
Bob Weinand 76a4ea5e2a Export ENV in .sh file generated by run-tests 2021-05-31 10:47:14 +02:00
Christoph M. Becker 140eca603c Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix typo in test case (doe → die)
2021-05-29 15:39:17 +02:00
Christoph M. Becker 4ab434fa0e Fix typo in test case (doe → die) 2021-05-29 15:36:40 +02:00
Christoph M. Becker af146a42ff Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Speed up ext/dba/tests/bug78808.phpt
2021-05-28 23:24:55 +02:00
Christoph M. Becker c11b52de95 Speed up ext/dba/tests/bug78808.phpt
This tests takes about 2 minutes on AppVeyor CI, what is super slow.
The problem is that we're doing 50,000 inserts of small keys and values
instead of only few inserts with large values, what basically has the
same effect regarding the mmap size.

Closes GH-7073.
2021-05-28 23:24:18 +02:00
Máté Kocsis a0af84bebd Fixed bug #81088 error in regression test for oci_fetch_object() and oci_fetch_array()
Closes GH-7072
2021-05-28 17:56:51 +02:00
Máté Kocsis 15ec7404f1 Fix the return types in ext/snmp (#7068) 2021-05-28 12:34:46 +02:00
twosee b751c24e23 Fix argument index in stream_select()
Closes GH-7067.
2021-05-28 17:37:51 +08:00
Nikita Popov ddb550f1f8 Fix session test 2021-05-28 09:45:06 +02:00
Máté Kocsis 6fb08f4607 Fix return type of SessionHandler::gc()
Relates to GH-7006
2021-05-27 23:07:27 +02:00
Máté Kocsis b165197f0f Fix session cleanup 2021-05-27 23:03:19 +02:00
Máté Kocsis 9bba9f68df Fix a few ext/phar return types 2021-05-27 16:31:18 +02:00
Máté Kocsis 2d47447d66 Add a few missing RETURN_THROWS();
Only PharFileInfo::compress() really needs it though.
2021-05-27 16:31:18 +02:00
Nikita Popov 635303aec5 Fixed bug #80761
When row data split across multiple packets, allocate a temporary
buffer that can be reallocated, and only copy into the row buffer
pool arena once we know the final size. This avoids quadratic
memory usage for very large results.

(cherry picked from commit 1fc4c89214)
2021-05-27 16:00:03 +02:00
Remi Collet f9fd3595ec Fix snmp build without DES 2021-05-27 14:58:07 +02:00
Dmitry Stogov ac65f6af6e Fixed bug #81051 (Broken property type handling after incrementing reference) 2021-05-27 15:22:34 +03:00
Máté Kocsis ceb0951fa5 mysqli_get_client_info() cannot return null
This method is already deprecated
2021-05-26 17:48:35 +02:00
Nikita Popov 9f6ee9f4d7 Update func info for mysqli_connect 2021-05-26 14:36:21 +02:00
Nikita Popov 0b232cf71d Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Make tests compatible with libxml2 2.9.12
2021-05-26 13:20:36 +02:00
Stéphan Kochen f3d1e9ed06 Make tests compatible with libxml2 2.9.12
This version of libxml introduced quite a few changes. Most of
them are differences in error reporting, while some also change
behavior, e.g. null bytes are no longer supported and xinclude
recursion is limited.

Closes GH-7030. Closes GH-7046.

Co-authored-by: Nikita Popov <nikic@php.net>
2021-05-26 13:19:34 +02:00
Máté Kocsis 97f7279353 Fix the return type of mysqli_connect() 2021-05-26 12:07:02 +02:00
Máté Kocsis 86ef34fc61 Fix the return type of mysqli::connect() 2021-05-26 11:55:03 +02:00
Christoph M. Becker a5601b2ab5 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #76359: open_basedir bypass through adding ".."
2021-05-25 13:46:38 +02:00
Christoph M. Becker ee9e07541f Fix #76359: open_basedir bypass through adding ".."
We explicitly forbid adding paths with a leading `..` to `open_basedir`
at runtime.

Closes GH-7024.
2021-05-25 13:44:53 +02:00
Nikita Popov 0fb371440d Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix bug #81068: Fix possible use-after-free in realpath_cache_clean()
2021-05-25 11:40:57 +02:00
Dimitry Andric 99a208566a Fix bug #81068: Fix possible use-after-free in realpath_cache_clean()
If ZTS is enabled, this can cause cwd_globals_ctor() to be called
multiple times, each with a freshly allocated virtual_cwd_globals
instance. At shutdown time however, cwd_globals_dtor() will call
realpath_cache_clean(), which then possibly cleans up the same
realpath_cache instance more than once. Using AddressSanitzer, this
shows up as a heap use-after-free.

To avoid this, add a helper function to do the actual work on one
instance of a realpath_cache, and call it both from cwd_globals_dtor()
and realpath_cache_clean(). The former uses the virtual_cwd_globals
parameter passed in via the destructor, the latter uses the CWDG()
macro.
2021-05-25 11:40:28 +02:00
Joe Watkins 213063f6ca Fix #81076 Invalid implicit binds cause incorrect count in static vars of closure debug info 2021-05-25 11:26:38 +02:00
Joe Watkins cfd4d3df0b Fix #77627 method_exists on Closure::__invoke 2021-05-25 11:22:05 +02:00
Christoph M. Becker 8bcaaa3579 Fix some imagecolor*() return types
These functions either return always a valid color, or `-1` on failure,
but never `false`.

Closes GH-7041.
2021-05-24 14:19:29 +02:00
Máté Kocsis 25e24715d7 Fix imagesetclip() parameter names
Closes GH-7035
2021-05-23 19:40:12 +02:00
Christoph M. Becker 24d9527c75 SimpleXMLElement::addAttribute() is a void function
Closes GH-7033.
2021-05-22 22:28:34 +02:00
Christoph M. Becker dcdac65dab Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Update version in php_version.h as well
2021-05-22 15:47:35 +02:00
Christoph M. Becker 59522ba968 Update version in php_version.h as well
The version there is automatically updated during `./configure`, but
not on Windows.
2021-05-22 15:42:57 +02:00
Dmitry Stogov 11a7310b49 Disable ASSIGN + SEND_VAL fusion for cases when destroying of old value may throw an exception. 2021-05-21 13:36:58 +03:00
Nikita Popov db6e60e744 Pass flags to #[Attribute] on internal attributes
While the specified restriction was checked, the #[Attribute]
attribute did not specify the flags parameter, so that Reflection
returned incorrect information.

In particular, Attribute itself has a CLASS target, not an ALL
target.
2021-05-21 11:40:23 +02:00
Dmitry Stogov 025c0763e7 Fix register save/restore around calls. (This fixes
ext/opcache/tests/jit/fetch_dim_rw_001.phpt with -d opcache.jit=1202
without PROFITABILITY_CHECKS)
2021-05-21 11:08:56 +03:00
Derick Rethans 2b4acf0cee Merge branch 'detect_musl_and_turn_off_tls_attribute' into PHP-8.0 2021-05-21 09:03:23 +01:00
Derick Rethans 804420b011 Detect musl libc to not set tls_model attribute on that platform
This fixes:
``_tsrm_ls_cache: initial-exec TLS resolves to dynamic definition``
in shared extensions.
2021-05-21 09:02:46 +01:00
Dmitry Stogov bf21261c63 Add missing undefined variable warning an result initialization.
(This fixes Zend/tests/bug78531.phpt without PROFITABILITY_CHECKS).
2021-05-21 10:03:00 +03:00
Dmitry Stogov db309b2e4b Don't assign to string offset after exception (This fixes
Zend/tests/bug31098.phpt failure without PROFITABILITY_CHECKS)
2021-05-21 00:48:24 +03:00
Dmitry Stogov cce0cc8836 JIT: Fixed incorrect condition (this leaded to
Zend/tests/type_declarations/typed_properties_083.phpt failure without
PROFITABILITY_CHECKS)
2021-05-21 00:01:00 +03:00
Dmitry Stogov 6e2d47e071 Fixed bug #80968 (JIT segfault with return from required file) 2021-05-20 16:45:24 +03:00
Nikita Popov ef59d09af0 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix handling of open_basedir that contains cwd
2021-05-20 09:53:25 +02:00
Nikita Popov ee7a8acde9 Fix handling of open_basedir that contains cwd
While resolving the path, the last step will reduce it down to ""
(an empty string) and realpath() will resolve this to getcwd().
If open_basedir contains the CWD, then that means open_basedir
will be bypassed for paths that don't have any components that
exist (if one of the components exists, then we abort the realpath
loop at that point).

Closes GH-7015.
2021-05-20 09:52:21 +02:00
Sara Golemon 64918fee97 Prep for 8.0.8 2021-05-19 19:18:56 +00:00
Christoph M. Becker 5dfdd694e7 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #81048: phpinfo(INFO_VARIABLES) "Array to string conversion"
2021-05-19 14:09:21 +02:00
Christoph M. Becker 36b9bdeeec Fix #81048: phpinfo(INFO_VARIABLES) "Array to string conversion"
Now that we properly dereference references of the superglobals. we
also need to dereference contained references to avoid to string
conversion.

Closes GH-7014.
2021-05-19 14:07:15 +02:00
Nikita Popov 62a9f97381 Move preload_autoload assignment into preload_load()
We need to set the preload autoloader even if preloading happened
in a different process. accel_preload() will only run in one.

In particular, this fixes the behavior if preload_user is used.
2021-05-19 12:55:46 +02:00
Derick Rethans 6bc7370532 Merge branch 'PHP-8.0' of github.com:php/php-src into PHP-8.0 2021-05-18 13:46:04 +01:00
Derick Rethans 8cd6acd69b Merge branch 'PHP-7.4' into PHP-8.0 2021-05-18 13:45:14 +01:00