]> granicus.if.org Git - php/log
php
4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Fri, 20 Nov 2020 15:50:52 +0000 (16:50 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix typos in php.ini files

4 years agoFix typos in php.ini files
Benjamin Morel [Fri, 20 Nov 2020 13:45:35 +0000 (14:45 +0100)]
Fix typos in php.ini files

Closes GH-6441.

[ci skip]

4 years agoUPGRADING: (real) cast has been removed
jrfnl [Fri, 20 Nov 2020 01:20:03 +0000 (02:20 +0100)]
UPGRADING: (real) cast has been removed

.. but the removal wasn't mentioned in the `UPGRADING` docs yet.

Ref:
* https://github.com/php/php-src/pull/5220
* https://github.com/php/php-src/commit/c9db32271a8083721582c5ec1dd09c4d4f562c74

Closes GH-6440.

[ci-skip]

4 years agoUse MIN/MAX when dumping RANGE[]
Nikita Popov [Thu, 19 Nov 2020 11:46:52 +0000 (12:46 +0100)]
Use MIN/MAX when dumping RANGE[]

It's very common that one of the bounds is LONG_MIN or LONG_MAX.
Dump them as MIN/MAX instead of the int representation in that
case, as it makes the dump less noisy.

4 years agoFixed incorrect TRACE_FRAME_MASK_NESTED flag setting
Dmitry Stogov [Fri, 20 Nov 2020 15:22:21 +0000 (18:22 +0300)]
Fixed incorrect TRACE_FRAME_MASK_NESTED flag setting

4 years agoFixed 32-bit JIT
Dmitry Stogov [Fri, 20 Nov 2020 12:12:30 +0000 (15:12 +0300)]
Fixed 32-bit JIT

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Thu, 19 Nov 2020 18:26:33 +0000 (19:26 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #72964: White space not unfolded for CC/Bcc headers

4 years agoFix #72964: White space not unfolded for CC/Bcc headers
Christoph M. Becker [Tue, 10 Nov 2020 15:13:54 +0000 (16:13 +0100)]
Fix #72964: White space not unfolded for CC/Bcc headers

`\r\n` does only terminate a header, if not followed by `\t` or ` `.
We have to cater to that when determining the end position of the
respective headers.

Closes GH-6420.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Thu, 19 Nov 2020 15:26:14 +0000 (16:26 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80345: PHPIZE configuration has outdated PHP_RELEASE_VERSION

4 years agoFix #80345: PHPIZE configuration has outdated PHP_RELEASE_VERSION
Christoph M. Becker [Tue, 10 Nov 2020 12:51:40 +0000 (13:51 +0100)]
Fix #80345: PHPIZE configuration has outdated PHP_RELEASE_VERSION

We must not redefine the version "constants" for phpize builds, because
these have already generated in phpize.js, from where we pass these
variables forward to configure.js.

We also add `PHP_EXTRA_VERSION` and `PHP_VERSION_STRING` to the files
for completeness.

Closes GH-6419.

4 years ago8.0 branch should be prepping for 8.0.1
Sara Golemon [Thu, 19 Nov 2020 14:37:44 +0000 (14:37 +0000)]
8.0 branch should be prepping for 8.0.1

4 years agoPrepare NEWS file for GA
Sara Golemon [Thu, 19 Nov 2020 14:27:49 +0000 (14:27 +0000)]
Prepare NEWS file for GA

4 years agoAdded missing deoptimization code for trampoline handling
Dmitry Stogov [Thu, 19 Nov 2020 09:32:36 +0000 (12:32 +0300)]
Added missing deoptimization code for trampoline handling

4 years agoExport zend_is_callable_at_frame
Nikita Popov [Thu, 19 Nov 2020 09:29:32 +0000 (10:29 +0100)]
Export zend_is_callable_at_frame

Export the zend_is_callable_impl() function as
zend_is_callable_at_frame() for use by extension. As twose pointed
out, an extension may want to retrieve fcc for a private method.

4 years agoFix curl_multi_getcontent() parameter name
Nikita Popov [Wed, 18 Nov 2020 15:43:45 +0000 (16:43 +0100)]
Fix curl_multi_getcontent() parameter name

While the function name starts with curl_multi_*, the function
actually accepts a CurlHandle. As such, it should also use just
$handle as the parameter name.

Closes GH-6435.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Wed, 18 Nov 2020 11:46:12 +0000 (12:46 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Short-circuit get_gc for currently running generator

4 years agoShort-circuit get_gc for currently running generator
Nikita Popov [Wed, 18 Nov 2020 11:44:31 +0000 (12:44 +0100)]
Short-circuit get_gc for currently running generator

4 years agoFixed register clobbering
Dmitry Stogov [Wed, 18 Nov 2020 07:22:25 +0000 (10:22 +0300)]
Fixed register clobbering

4 years agoFixed trampoline handling
Dmitry Stogov [Tue, 17 Nov 2020 20:56:05 +0000 (23:56 +0300)]
Fixed trampoline handling

4 years agoUpdate NEWS for 8.0.0
Gabriel Caruso [Tue, 17 Nov 2020 16:34:55 +0000 (16:34 +0000)]
Update NEWS for 8.0.0

4 years agoUpdate NEWS for PHP 8.0.0RC5
Gabriel Caruso [Tue, 17 Nov 2020 16:23:11 +0000 (16:23 +0000)]
Update NEWS for PHP 8.0.0RC5

4 years agoFixed allocated register clobbering
Dmitry Stogov [Tue, 17 Nov 2020 15:31:14 +0000 (18:31 +0300)]
Fixed allocated register clobbering

4 years agoFixed false pasitive ASAN NULL pointer dereference warning
Dmitry Stogov [Tue, 17 Nov 2020 13:23:30 +0000 (16:23 +0300)]
Fixed false pasitive ASAN NULL pointer dereference warning

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Tue, 17 Nov 2020 12:16:17 +0000 (13:16 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80312: change default engine from MyISAM to InnoDB in tests

4 years agoFix #80312: change default engine from MyISAM to InnoDB in tests
Darek Slusarczyk [Fri, 6 Nov 2020 14:41:15 +0000 (15:41 +0100)]
Fix #80312: change default engine from MyISAM to InnoDB in tests

Change mysqli and pdo_mysql tests configuration to use by default
InnoDB instead of MyISAM.

Closes GH-6405.

4 years agoFixed bug #80370: Segmentation fault reflecting attributes of dynamic property
Benjamin Eberlei [Sun, 15 Nov 2020 07:45:26 +0000 (08:45 +0100)]
Fixed bug #80370: Segmentation fault reflecting attributes of dynamic property

Closes GH-6428.

4 years agoProvide unused retvals to observers
Sammy Kaye Powers [Wed, 11 Nov 2020 22:25:39 +0000 (14:25 -0800)]
Provide unused retvals to observers

Make sure that the return value is available to observers, even if
it is not used by the caller.

Closes GH-6422.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Tue, 17 Nov 2020 09:20:23 +0000 (10:20 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix incorrectly optimized out live range

4 years agoFix incorrectly optimized out live range
Nikita Popov [Tue, 17 Nov 2020 09:18:37 +0000 (10:18 +0100)]
Fix incorrectly optimized out live range

For x ? y : z style structures, the live range starts at z, but
may also hold the value of y. Make sure that the refcounting check
takes this into account, by checking the type of a potential phi
user.

4 years agoFire open observer end handlers after a zend_bailout
Sammy Kaye Powers [Fri, 23 Oct 2020 18:43:31 +0000 (11:43 -0700)]
Fire open observer end handlers after a zend_bailout

Closes GH-6377

4 years agoFixed MAY_BE_INDIRECT inference
Dmitry Stogov [Mon, 16 Nov 2020 15:17:05 +0000 (18:17 +0300)]
Fixed MAY_BE_INDIRECT inference

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 16 Nov 2020 13:33:45 +0000 (14:33 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #74558: Can't rebind closure returned by Closure::fromCallable()

4 years agoFix #74558: Can't rebind closure returned by Closure::fromCallable()
Christoph M. Becker [Thu, 12 Nov 2020 14:37:51 +0000 (15:37 +0100)]
Fix #74558: Can't rebind closure returned by Closure::fromCallable()

Failure to rebind such closures is not necessarily related to them
being created by `ReflectionFunctionAbstract::getClosure()`, so we fix
the error message.

Closes GH-6424.

4 years agoFixed alias handling
Dmitry Stogov [Mon, 16 Nov 2020 13:11:25 +0000 (16:11 +0300)]
Fixed alias handling

4 years agoFixed reference-counting
Dmitry Stogov [Mon, 16 Nov 2020 11:51:55 +0000 (14:51 +0300)]
Fixed reference-counting

4 years agoFixed incorrect FETCH_THIS optimization
Dmitry Stogov [Mon, 16 Nov 2020 11:51:39 +0000 (14:51 +0300)]
Fixed incorrect FETCH_THIS optimization

4 years agoFixed inconsistent VM stack state
Dmitry Stogov [Mon, 16 Nov 2020 10:19:44 +0000 (13:19 +0300)]
Fixed inconsistent VM stack state

4 years agoTrampoline cleanup
Dmitry Stogov [Mon, 16 Nov 2020 09:05:45 +0000 (12:05 +0300)]
Trampoline cleanup

4 years ago[ci skip] Add note that imagedestroy() no longer has an effect
Pavel Djundik [Sat, 14 Nov 2020 11:12:38 +0000 (13:12 +0200)]
[ci skip] Add note that imagedestroy() no longer has an effect

Closes GH-6427.

4 years agoInline pair production in json parser
Nikita Popov [Fri, 13 Nov 2020 13:55:26 +0000 (14:55 +0100)]
Inline pair production in json parser

Having this as a separate production has a noticeable performance
impact, and doesn't really make things clearer either.

4 years agoStrip trailing line breaks and periods from Windows error messages
Christoph M. Becker [Thu, 12 Nov 2020 13:58:47 +0000 (14:58 +0100)]
Strip trailing line breaks and periods from Windows error messages

PHP error messages should not contain line breaks, so we remove these
from the Windows specific error messages.  We also remove trailing
periods for the same reason.

Closes GH-6423.

4 years agoDon't assume libmysqlclient library name
Nikita Popov [Thu, 12 Nov 2020 14:09:18 +0000 (15:09 +0100)]
Don't assume libmysqlclient library name

By simply dropping the additional checks, in line with the general
guideline of trusting the output of config scripts (this should
be migrated to pkg-config though).

Also drop the code for manually adding -z if mysql_config does not
-- that's not our problem.

4 years agoFix memory leak when user filter onCreate returns false
Nikita Popov [Thu, 12 Nov 2020 11:18:33 +0000 (12:18 +0100)]
Fix memory leak when user filter onCreate returns false

4 years agoFix memory leak with bcsqrt on number 0<X<1
Nikita Popov [Thu, 12 Nov 2020 10:37:54 +0000 (11:37 +0100)]
Fix memory leak with bcsqrt on number 0<X<1

4 years agoFix reflection getDefaultValue() with user arg info
Nikita Popov [Thu, 12 Nov 2020 10:02:04 +0000 (11:02 +0100)]
Fix reflection getDefaultValue() with user arg info

The default value is part of the op_array in that case, but we have
no way to access it. Fail gracefully.

4 years agoFixed incorrectly eliminated type store
Dmitry Stogov [Wed, 11 Nov 2020 17:13:58 +0000 (20:13 +0300)]
Fixed incorrectly eliminated type store

4 years agoRemove assertion
Dmitry Stogov [Wed, 11 Nov 2020 15:34:16 +0000 (18:34 +0300)]
Remove assertion

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Wed, 11 Nov 2020 15:03:10 +0000 (16:03 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Handle errors during next_result()

4 years agoHandle errors during next_result()
Nikita Popov [Wed, 11 Nov 2020 14:56:05 +0000 (15:56 +0100)]
Handle errors during next_result()

4 years agoFixed incorrect invariant guard motion
Dmitry Stogov [Wed, 11 Nov 2020 14:34:46 +0000 (17:34 +0300)]
Fixed incorrect invariant guard motion

4 years agoStop on fake frame
Dmitry Stogov [Wed, 11 Nov 2020 11:54:54 +0000 (14:54 +0300)]
Stop on fake frame

4 years agoFixed reference-counting propagation
Dmitry Stogov [Wed, 11 Nov 2020 11:54:00 +0000 (14:54 +0300)]
Fixed reference-counting propagation

4 years agoFix double free when socket_accept fails
Nikita Popov [Wed, 11 Nov 2020 11:48:25 +0000 (12:48 +0100)]
Fix double free when socket_accept fails

4 years agoRetain reference to share handle from curl handle
Nikita Popov [Wed, 11 Nov 2020 10:51:20 +0000 (11:51 +0100)]
Retain reference to share handle from curl handle

Not keeping a reference will not result in use after free, because
curl protects against it, but it will result in a memory leak,
because curl_share_cleanup() will fail. We should make sure that
the share handle object stays alive as long as the curl handles
use it.

4 years ago[Observer+JIT] Save opline before calling begin/end handlers
Dmitry Stogov [Wed, 11 Nov 2020 10:50:53 +0000 (13:50 +0300)]
[Observer+JIT] Save opline before calling begin/end handlers

4 years ago[Observer] Save opline before calling begin/end handlers
Dmitry Stogov [Wed, 11 Nov 2020 10:06:55 +0000 (13:06 +0300)]
[Observer] Save opline before calling begin/end handlers

4 years agoFix community job
Nikita Popov [Wed, 11 Nov 2020 08:28:20 +0000 (09:28 +0100)]
Fix community job

Made a mistake while merging...

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Tue, 10 Nov 2020 17:58:38 +0000 (17:58 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

4 years agoPHP-7.4 is now for 7.4.14
Derick Rethans [Tue, 10 Nov 2020 17:58:21 +0000 (17:58 +0000)]
PHP-7.4 is now for 7.4.14

4 years agoUpdate NEWS for 8.0.0
Gabriel Caruso [Tue, 10 Nov 2020 11:02:35 +0000 (11:02 +0000)]
Update NEWS for 8.0.0

4 years agoUpdate NEWS for PHP 8.0.0RC4
Gabriel Caruso [Tue, 10 Nov 2020 10:52:13 +0000 (10:52 +0000)]
Update NEWS for PHP 8.0.0RC4

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Tue, 10 Nov 2020 10:45:59 +0000 (11:45 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Add integration test for symfony preloading

4 years agoAdd integration test for symfony preloading
Nikita Popov [Mon, 9 Nov 2020 14:13:33 +0000 (15:13 +0100)]
Add integration test for symfony preloading

To help catch regressions like the one that occurred in PHP 7.4.12.

Closes GH-6414.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 10 Nov 2020 10:11:06 +0000 (11:11 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  7.3.26 is next

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 10 Nov 2020 10:09:40 +0000 (11:09 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  7.3.26 is next

4 years ago7.3.26 is next
Christoph M. Becker [Tue, 10 Nov 2020 10:08:16 +0000 (11:08 +0100)]
7.3.26 is next

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 9 Nov 2020 16:08:38 +0000 (17:08 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix phi use chain management when renaming variable

4 years agoFix phi use chain management when renaming variable
Nikita Popov [Mon, 9 Nov 2020 16:06:41 +0000 (17:06 +0100)]
Fix phi use chain management when renaming variable

If there is a previous use of the new variable in the phi, we need
to NULL out the use chain of the new source we're adding.

Test case is reduced from an assertion failure in the Symfony Demo.

4 years agoUse true/false instead of TRUE/FALSE in intl
Nikita Popov [Mon, 9 Nov 2020 13:44:11 +0000 (14:44 +0100)]
Use true/false instead of TRUE/FALSE in intl

And drop the U_DEFINE_TRUE_AND_FALSE flag.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 9 Nov 2020 13:35:40 +0000 (14:35 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed bug #80310: Support for icu4c 68.1.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 9 Nov 2020 13:34:24 +0000 (14:34 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #80310: Support for icu4c 68.1.

4 years agoFixed bug #80310: Support for icu4c 68.1.
Alexander M. Turek [Tue, 3 Nov 2020 18:14:41 +0000 (19:14 +0100)]
Fixed bug #80310: Support for icu4c 68.1.

On stable versions, bring back the TRUE/FALSE defines by defining
_U_DEFINE_TRUE_AND_FALSE.

Closes GH-6397.

4 years agoRemove embedded property from mysqli_driver
Dharman [Fri, 6 Nov 2020 23:00:33 +0000 (23:00 +0000)]
Remove embedded property from mysqli_driver

All other leftovers of this feature have been dropped in PHP 8,
so we should remove the property as well.

Closes GH-6407.

4 years agoFixed bug #80334
Nikita Popov [Mon, 9 Nov 2020 09:18:43 +0000 (10:18 +0100)]
Fixed bug #80334

If assert() was called with named args, add description as named
arg as well.

4 years agoFixed missaligned access
Dmitry Stogov [Mon, 9 Nov 2020 08:50:26 +0000 (11:50 +0300)]
Fixed missaligned access

4 years agoSkip preload test under asan
Nikita Popov [Mon, 9 Nov 2020 08:46:48 +0000 (09:46 +0100)]
Skip preload test under asan

Just like the other preload tests with startup failures, this may
cause leaks.

4 years agoRename PhpToken::getAll() to PhpToken::tokenize()
Nikita Popov [Mon, 9 Nov 2020 08:40:31 +0000 (09:40 +0100)]
Rename PhpToken::getAll() to PhpToken::tokenize()

See https://externals.io/message/112189.
Fixes bug #80328.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Sat, 7 Nov 2020 18:49:00 +0000 (18:49 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

4 years agoUpdate version in 7.4 branch
Derick Rethans [Sat, 7 Nov 2020 18:48:13 +0000 (18:48 +0000)]
Update version in 7.4 branch

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Fri, 6 Nov 2020 16:44:51 +0000 (17:44 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Split tests for compatibility with ICU 68.1

4 years agoSplit tests for compatibility with ICU 68.1
Christoph M. Becker [Fri, 6 Nov 2020 16:11:26 +0000 (17:11 +0100)]
Split tests for compatibility with ICU 68.1

4 years agoRaise E_WARNING on PHP related errors
Christoph M. Becker [Tue, 20 Oct 2020 10:31:58 +0000 (12:31 +0200)]
Raise E_WARNING on PHP related errors

If Zip operations fails due to PHP error conditions before libzip even
has been called, there is no meaningful indication what failed; the
functions just return false, and the Zip status indicated that no error
did occur.  Therefore we raise `E_WARNING` in these cases.

Closes GH-6356.

4 years agoMove stack overflow checks out of the loops
Dmitry Stogov [Fri, 6 Nov 2020 09:09:56 +0000 (12:09 +0300)]
Move stack overflow checks out of the loops

4 years agoreport about ZSTD compression availability
Remi Collet [Thu, 5 Nov 2020 16:18:22 +0000 (17:18 +0100)]
report about ZSTD compression availability

4 years agoonly display libzip both headers/library versions if they differ
Remi Collet [Thu, 5 Nov 2020 16:13:39 +0000 (17:13 +0100)]
only display libzip both headers/library versions if they differ

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 5 Nov 2020 15:37:45 +0000 (16:37 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Backport preloading trait fixup fixes

4 years agoBackport preloading trait fixup fixes
Nikita Popov [Thu, 5 Nov 2020 10:58:31 +0000 (11:58 +0100)]
Backport preloading trait fixup fixes

This cherry-picks 33969c2252b2c33a72c9039072af8862fd347a5f and
2effbfd8713936742ef46e6e85ce193b320ac005 from PHP-8.0.

The issues these commits fix could also manifest in PHP 7.4, and
a commenter on bug #80307 reports this this might indeed be
happening.

4 years agoFixed incorrect invariant guard motion
Dmitry Stogov [Thu, 5 Nov 2020 15:32:00 +0000 (18:32 +0300)]
Fixed incorrect invariant guard motion

4 years agoFixup trait methods even if no traits are used
Nikita Popov [Thu, 5 Nov 2020 12:15:32 +0000 (13:15 +0100)]
Fixup trait methods even if no traits are used

Trait methods might be non-trivially inherited, in which case we
may have to perform fixup in classes that do not directly use any
traits.

4 years agoFix multiple trait fixup
Nikita Popov [Thu, 5 Nov 2020 10:58:31 +0000 (11:58 +0100)]
Fix multiple trait fixup

If a trait method is inherited, preloading trait fixup might be
performed on it multiple times. Usually this is fine, because
the opcodes pointer will have already been updated, and will thus
not be found in the xlat table.

However, it can happen that the new opcodes pointer is the same
as one of the old opcodes pointers, if the pointer has been reused
by the allocator. In this case we will look up the wrong op array
and overwrite the trait method with an unrelated trait method.

We fix this by indexing the xlat table not by the opcodes pointer,
but by the refcount pointer. The refcount pointer is not changed
during optimization, and accurately represents which op arrays
should use the same opcodes.

Fixes bug #80307. The test case does not reproduce the bug, because
this depends on a lot of "luck" with the allocator. The test case
merely illustrates a case where orig_op_array would have been NULL
in the original code.

4 years agoEnd output handlers in preload shutdown
Nikita Popov [Wed, 4 Nov 2020 15:03:39 +0000 (16:03 +0100)]
End output handlers in preload shutdown

Same as in php_request_shutdown(), we need to end any active
output handlers, as these may no longer be safe to execute
lateron.

4 years agogetlastmod() can return false
Nikita Popov [Wed, 4 Nov 2020 14:49:12 +0000 (15:49 +0100)]
getlastmod() can return false

At least this can happen during preloading.

4 years agoFix static variable in methods inheritance during preloading
Nikita Popov [Wed, 4 Nov 2020 14:33:11 +0000 (15:33 +0100)]
Fix static variable in methods inheritance during preloading

This is now "bug compatible" with the normal behavior, and more
imporantly, does not crash :)

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Wed, 4 Nov 2020 13:56:54 +0000 (14:56 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80266: parse_url silently drops port number 0

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 4 Nov 2020 13:54:14 +0000 (14:54 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80266: parse_url silently drops port number 0

4 years agoFix #80266: parse_url silently drops port number 0
Christoph M. Becker [Wed, 4 Nov 2020 10:34:10 +0000 (11:34 +0100)]
Fix #80266: parse_url silently drops port number 0

As of commit 81b2f3e[1], `parse_url()` accepts URLs with a zero port,
but does not report that port, what is wrong in hindsight.

Since the port number is stored as `unsigned short` there is no way to
distinguish between port zero and no port.  For BC reasons, we thus
introduce `parse_url_ex2()` which accepts an output parameter that
allows that distinction, and use the new function to fix the behavior.

The introduction of `parse_url_ex2()` has been suggested by Nikita.

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

Closes GH-6399.

4 years agoAssert that references are not persisted
Nikita Popov [Wed, 4 Nov 2020 13:51:44 +0000 (14:51 +0100)]
Assert that references are not persisted

There should not be any need to persist references, and it's unlikely
that persisting a reference will behave correctly at runtime, because
we don't have a concept of an immutable reference.

4 years agoDon't xfail method_static_var.phpt
Nikita Popov [Wed, 4 Nov 2020 11:30:41 +0000 (12:30 +0100)]
Don't xfail method_static_var.phpt

Let's test the current behavior here. It might not be right, but
it's long-standing behavior.

Nearly missed an assertion failure here because the test was
XFAILed...

4 years agoDon't disable opcache for generic tests
Nikita Popov [Wed, 4 Nov 2020 10:11:14 +0000 (11:11 +0100)]
Don't disable opcache for generic tests

Even if the original issue only reproduces without opcache, we
should still allow running them with and without opcache.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Wed, 4 Nov 2020 09:55:59 +0000 (10:55 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix dynamic function definition in preload script