]> granicus.if.org Git - php/log
php
5 years agoReduce reallocations in exif parsing
Nikita Popov [Thu, 7 Nov 2019 20:07:58 +0000 (21:07 +0100)]
Reduce reallocations in exif parsing

Instead of reallocating lists element by element, increase the
allocated list size exponentially.

5 years agoReduce size limit in parser fuzzer
Nikita Popov [Thu, 7 Nov 2019 19:47:04 +0000 (20:47 +0100)]
Reduce size limit in parser fuzzer

Avoid stack overflows during compilation of deeply nested
expressions.

5 years agoAdd stubs for standard lib functions
Máté Kocsis [Fri, 1 Nov 2019 14:00:14 +0000 (15:00 +0100)]
Add stubs for standard lib functions

5 years agoPromote register_tick_function() callback validation warning to an exception
Máté Kocsis [Thu, 7 Nov 2019 00:11:57 +0000 (01:11 +0100)]
Promote register_tick_function() callback validation warning to an exception

5 years agoRemove PHP_SLEEP_NON_VOID as it is not useful anymore
Máté Kocsis [Thu, 7 Nov 2019 00:10:52 +0000 (01:10 +0100)]
Remove PHP_SLEEP_NON_VOID as it is not useful anymore

5 years agoAdd compile warning for "confusable" types
Nikita Popov [Fri, 11 Oct 2019 13:32:02 +0000 (15:32 +0200)]
Add compile warning for "confusable" types

We have a number of "types" like integer which are not actually
supported as builtin types -- instead they are silently interpreted
as class types.

I've seen this cause confusion a few types already. This change adds
a warning in this case. In the unlikely case that someone legitimately
wants to type against an integer class, the warning can be suppressed
by writing \integer or "use integer", or using Integer (this warning
will only trigger for lowercase spellings).

Closes GH-4815.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 7 Nov 2019 13:42:16 +0000 (14:42 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Wrap hrtime in `extern "c" {}`

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 7 Nov 2019 13:42:11 +0000 (14:42 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Wrap hrtime in `extern "c" {}`

5 years agoWrap hrtime in `extern "c" {}`
Levi Morrison [Wed, 6 Nov 2019 17:30:09 +0000 (10:30 -0700)]
Wrap hrtime in `extern "c" {}`

This allows it to be used by C++ extensions without them having to do their own forward declares.

Closes GH-4890.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 7 Nov 2019 13:32:03 +0000 (14:32 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix php_pcre_mutex_free()

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 7 Nov 2019 13:31:55 +0000 (14:31 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix php_pcre_mutex_free()

5 years agoFix php_pcre_mutex_free()
Nikita Popov [Thu, 7 Nov 2019 13:29:51 +0000 (14:29 +0100)]
Fix php_pcre_mutex_free()

We should only set the mutex to NULL if we actually freed it.
Due to missing braces non-main threads may currently set it to
NULL first.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 7 Nov 2019 13:06:53 +0000 (14:06 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Remove outdated comments in test

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 7 Nov 2019 13:06:48 +0000 (14:06 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Remove outdated comments in test

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Thu, 7 Nov 2019 13:06:33 +0000 (14:06 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Remove outdated comments in test

5 years agoRemove outdated comments in test
Nikita Popov [Thu, 7 Nov 2019 13:06:23 +0000 (14:06 +0100)]
Remove outdated comments in test

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 7 Nov 2019 12:11:58 +0000 (13:11 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Disable ifunc resolvers under thread sanitizer as well

5 years agoDisable ifunc resolvers under thread sanitizer as well
Nikita Popov [Thu, 7 Nov 2019 12:08:03 +0000 (13:08 +0100)]
Disable ifunc resolvers under thread sanitizer as well

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 7 Nov 2019 10:48:47 +0000 (11:48 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add UPGRADING note about default object from empty value

[ci skip]

5 years agoAdd UPGRADING note about default object from empty value
Nikita Popov [Thu, 7 Nov 2019 10:48:02 +0000 (11:48 +0100)]
Add UPGRADING note about default object from empty value

Fixes bug #75921.

[ci skip]

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 7 Nov 2019 10:17:38 +0000 (11:17 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #78759

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 7 Nov 2019 10:17:14 +0000 (11:17 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #78759

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Thu, 7 Nov 2019 10:16:03 +0000 (11:16 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fixed bug #78759

5 years agoFixed bug #78759
Nikita Popov [Thu, 7 Nov 2019 10:15:29 +0000 (11:15 +0100)]
Fixed bug #78759

Handle INDIRECT values in array.

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Thu, 7 Nov 2019 09:01:43 +0000 (10:01 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #78788: ./configure generates invalid php_version.h

5 years agoFix #78788: ./configure generates invalid php_version.h
max [Thu, 7 Nov 2019 06:45:55 +0000 (07:45 +0100)]
Fix #78788: ./configure generates invalid php_version.h

Change $SED to "${SED}" such that the IFS is not used to split the
output of that variable.

5 years agoMove extra checks after zpp in get_browser()
Nikita Popov [Wed, 6 Nov 2019 16:50:48 +0000 (17:50 +0100)]
Move extra checks after zpp in get_browser()

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 6 Nov 2019 16:50:20 +0000 (17:50 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Remove bogus skipifs in get_browser tests

5 years agoRemove bogus skipifs in get_browser tests
Nikita Popov [Wed, 6 Nov 2019 16:48:16 +0000 (17:48 +0100)]
Remove bogus skipifs in get_browser tests

We provide this file, it should be readable.

These checks no longer work, since --INI-- values are no longer
passed to --SKIPIF--.

5 years agoFix consistency issues with array accesses warnings/exceptions
Máté Kocsis [Mon, 4 Nov 2019 18:44:48 +0000 (19:44 +0100)]
Fix consistency issues with array accesses warnings/exceptions

 * Change a number of "resource used as offset" notices to warnings,
   which were previously missed.
 * Throw the "resource used as offset" warning for isset() as well.
 * Make array_key_exists() behavior with regard to different key
   types consistent with isset() and normal array accesses. All key
   types now use the usual coercions and array/object keys throw
   TypeError.

Closes GH-4887.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 6 Nov 2019 11:53:29 +0000 (12:53 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #78787

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 6 Nov 2019 11:53:21 +0000 (12:53 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #78787

5 years agoFixed bug #78787
Nikita Popov [Wed, 6 Nov 2019 11:51:25 +0000 (12:51 +0100)]
Fixed bug #78787

Not the first time inheritance of shadow properties causes an issue,
thankfully this whole concept is gone in PHP 7.4.

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 5 Nov 2019 17:25:39 +0000 (18:25 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  7.3.13 is next

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 5 Nov 2019 17:25:10 +0000 (18:25 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  7.3.13 is next

5 years ago7.3.13 is next
Christoph M. Becker [Tue, 5 Nov 2019 17:17:04 +0000 (18:17 +0100)]
7.3.13 is next

5 years agoMerge branch 'PHP-7.4'
Sara Golemon [Tue, 5 Nov 2019 15:59:04 +0000 (10:59 -0500)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Bump for 7.2.26-dev

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Sara Golemon [Tue, 5 Nov 2019 15:58:59 +0000 (10:58 -0500)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Bump for 7.2.26-dev

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Sara Golemon [Tue, 5 Nov 2019 15:58:35 +0000 (10:58 -0500)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Bump for 7.2.26-dev

5 years agoBump for 7.2.26-dev
Sara Golemon [Tue, 5 Nov 2019 15:56:19 +0000 (10:56 -0500)]
Bump for 7.2.26-dev

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 5 Nov 2019 11:16:17 +0000 (12:16 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #78775

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 5 Nov 2019 11:15:49 +0000 (12:15 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #78775

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Tue, 5 Nov 2019 11:14:53 +0000 (12:14 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fixed bug #78775

5 years agoFixed bug #78775
Nikita Popov [Tue, 5 Nov 2019 11:13:46 +0000 (12:13 +0100)]
Fixed bug #78775

Clear the OpenSSL error queue before performing SSL stream operations.
As we don't control all code that could possibly be using OpenSSL,
we can't rely on the error queue being empty.

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 5 Nov 2019 09:19:06 +0000 (10:19 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Remove obsolete oniguruma.patch

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 5 Nov 2019 09:17:50 +0000 (10:17 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Remove obsolete oniguruma.patch

5 years agoRemove obsolete oniguruma.patch
Christoph M. Becker [Tue, 5 Nov 2019 09:16:22 +0000 (10:16 +0100)]
Remove obsolete oniguruma.patch

The proper `SIZEOF_SIZE_T` definitions are available as of Oniguruma
6.9.1; no more need to patch.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 4 Nov 2019 20:36:36 +0000 (21:36 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Remove dead code `ext/mysqlnd/mysqlnd_net.c`.

5 years agoRemove dead code `ext/mysqlnd/mysqlnd_net.c`.
Adam Saponara [Mon, 4 Nov 2019 19:07:29 +0000 (14:07 -0500)]
Remove dead code `ext/mysqlnd/mysqlnd_net.c`.

I believe this code has been dead since 05c5e05 (2015) now replaced
by `ext/mysqlnd/mysqlnd_vio.c`.

Closes GH-4888.

5 years agoAdd stubs for IntlTimeZone
Máté Kocsis [Fri, 11 Oct 2019 23:19:56 +0000 (01:19 +0200)]
Add stubs for IntlTimeZone

5 years agoMerge branch 'PHP-7.4'
Fabien Villepinte [Mon, 4 Nov 2019 12:56:18 +0000 (13:56 +0100)]
Merge branch 'PHP-7.4'

5 years agoAdd a test for ReflectionClass:getInterfaceNames()
Fabien Villepinte [Mon, 4 Nov 2019 12:51:40 +0000 (13:51 +0100)]
Add a test for ReflectionClass:getInterfaceNames()

The method was not tested against a class without interface.

5 years agoRemove support for array_key_exists() with objects
Nikita Popov [Mon, 4 Nov 2019 12:02:28 +0000 (13:02 +0100)]
Remove support for array_key_exists() with objects

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 4 Nov 2019 11:23:00 +0000 (12:23 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Make test more robust

5 years agoMake test more robust
Christoph M. Becker [Mon, 4 Nov 2019 11:16:05 +0000 (12:16 +0100)]
Make test more robust

Time flies, so obviously the reported uptime may differ a bit (as
already occasionally noticed on CI); we cater to that by allowing a
delay of up to one second.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 4 Nov 2019 10:34:02 +0000 (11:34 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Revert "Remove configure checks for supported instruction sets"

5 years agoRevert "Remove configure checks for supported instruction sets"
Nikita Popov [Mon, 4 Nov 2019 10:32:46 +0000 (11:32 +0100)]
Revert "Remove configure checks for supported instruction sets"

This reverts commit edccf32f7f36a8bc759b9482737e0c3efcb3a005.

This was reported to cause issues for as yet unknown reasons in
bug #78769. As this was intended as code cleanup, revert this from
7.4 at least. May reapply it to master later.

5 years agoRemove dead code related to inherits props in reflection
Nikita Popov [Mon, 4 Nov 2019 10:24:32 +0000 (11:24 +0100)]
Remove dead code related to inherits props in reflection

Public/protected properties defined in parent classes will be
inherited in the child -- there is no need to explicitly try to
walk up the chain and look them up.

5 years agoStore pointer to property_info in reflection
Nikita Popov [Mon, 4 Nov 2019 09:44:50 +0000 (10:44 +0100)]
Store pointer to property_info in reflection

Instead of constructing a dummy property_info for dynamic properties,
leave the field as NULL and handle this as appropriate.

This was originally part of an alternative fix for bug #78774, but
I think doing it this way is generally preferrable independently
of that.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 4 Nov 2019 10:04:11 +0000 (11:04 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #78774

5 years agoFixed bug #78774
Nikita Popov [Mon, 4 Nov 2019 10:01:56 +0000 (11:01 +0100)]
Fixed bug #78774

The string held by the zend_type may be released if the property
type gets resolved to a CE. I initially wanted to fix this by
storing a zend_type* instead (so the property type resolution
propagates to the ReflectionType), but decided against this in
light of upcoming union types support, where we also need to
represent parts of the union, and will not have a single zend_type*
we can reference.

5 years agoFix #55005: imagepolygon num_points requirement
Christoph M. Becker [Sat, 2 Nov 2019 12:53:09 +0000 (13:53 +0100)]
Fix #55005: imagepolygon num_points requirement

We actually have to check `$num_points` instead of `2*count($points)`,
because the latter may be greater than the former, but not all elements
of `$points` are guaranteed to be used.  This allowed to pass arrays
with excess elements to draw polygons with less than three vertices.

While the current implementation of `gdImagePolygon()` and friends
would allow us to draw monogons and digons, we don't allow that
anymore, because the respective drawing primitives work slightly
different (e.g. drawing lines support anti-aliasing, but drawing
general polygons does not).

To minimize the BC break, we do not fix this longstanding issue for PHP
7, but target PHP 8 only.

5 years agoAdd ext/phar arginfo stubs
Christoph M. Becker [Sat, 2 Nov 2019 10:39:31 +0000 (11:39 +0100)]
Add ext/phar arginfo stubs

5 years agoReduce oniguruma retry limit in fuzzer
Nikita Popov [Sat, 2 Nov 2019 09:40:41 +0000 (10:40 +0100)]
Reduce oniguruma retry limit in fuzzer

For some patterns matching may take quite long even at retry limit
100000 and it seems that this is not easy to fix on the oniguruma
side.

Reduce the retry limit by another factor of 10 in hope of reducing
timeouts.

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Sat, 2 Nov 2019 09:19:56 +0000 (10:19 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Print Client Library Version in phpinfo

5 years agoPrint Client Library Version in phpinfo
Simonov Denis [Thu, 31 Oct 2019 17:40:15 +0000 (18:40 +0100)]
Print Client Library Version in phpinfo

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Sat, 2 Nov 2019 09:13:07 +0000 (10:13 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Explicitly specify ubuntu versions on azure pipelines

5 years agoExplicitly specify ubuntu versions on azure pipelines
Nikita Popov [Sat, 2 Nov 2019 09:12:03 +0000 (10:12 +0100)]
Explicitly specify ubuntu versions on azure pipelines

Use the new 18.04 for the ones where the build succeeded and the
previous 16.04 where it didn't.

5 years agoRemove unused code
Christoph M. Becker [Fri, 1 Nov 2019 22:48:05 +0000 (23:48 +0100)]
Remove unused code

These are left-overs from image2wbmp(), which has already been removed.

5 years agoAccept int parameter in the first place
Christoph M. Becker [Fri, 1 Nov 2019 16:25:27 +0000 (17:25 +0100)]
Accept int parameter in the first place

This is more liberal then before, where that parameter (if given) had
to be IS_LONG, while now it would be converted to int according to weak
typing rules.  This is, however, more what a developer would expect.

5 years agoPromote some warnings to exceptions in standard lib
Máté Kocsis [Fri, 1 Nov 2019 11:38:26 +0000 (12:38 +0100)]
Promote some warnings to exceptions in standard lib

Closes GH-4879.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 1 Nov 2019 16:04:59 +0000 (17:04 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #78768

5 years agoFixed bug #78768
Nikita Popov [Fri, 1 Nov 2019 16:04:15 +0000 (17:04 +0100)]
Fixed bug #78768

Remove the typedef from zend_types.h, use explicit struct prefix
instead.

5 years agoAllow generating stubs for directory
Nikita Popov [Fri, 1 Nov 2019 15:32:33 +0000 (16:32 +0100)]
Allow generating stubs for directory

5 years agozend_parse_parameters_throw() is obsolete
Christoph M. Becker [Fri, 1 Nov 2019 12:19:52 +0000 (13:19 +0100)]
zend_parse_parameters_throw() is obsolete

Since `zend_parse_parameters()` throws now, there is no reason to
explicitly call `zend_parse_parameters_throw()` anymore, and since both
have actually the same implementation, we redefine the latter as macro.

5 years agoAdd missing ZPP checks
Máté Kocsis [Thu, 31 Oct 2019 09:20:41 +0000 (10:20 +0100)]
Add missing ZPP checks

Closes GH-4878.

5 years agoFinish OpenSSL arginfo stubs
Christoph M. Becker [Fri, 1 Nov 2019 14:19:57 +0000 (15:19 +0100)]
Finish OpenSSL arginfo stubs

5 years agoMerge branch 'PHP-7.4'
Fabien Villepinte [Fri, 1 Nov 2019 11:38:32 +0000 (12:38 +0100)]
Merge branch 'PHP-7.4'

5 years agoFix conflicts between tests with obscure filenames
Fabien Villepinte [Fri, 1 Nov 2019 11:33:36 +0000 (12:33 +0100)]
Fix conflicts between tests with obscure filenames

For non-windows tests

5 years agoMerge branch 'PHP-7.4'
Fabien Villepinte [Fri, 1 Nov 2019 11:27:04 +0000 (12:27 +0100)]
Merge branch 'PHP-7.4'

5 years agoFix conflicts between tests with obscure filenames
Fabien Villepinte [Fri, 1 Nov 2019 11:24:38 +0000 (12:24 +0100)]
Fix conflicts between tests with obscure filenames

5 years agopdo_oci: Add support for setting and getting the oracle OCI 18c call timeout value.
Cameron Porter [Fri, 25 Oct 2019 06:32:12 +0000 (08:32 +0200)]
pdo_oci: Add support for setting and getting the oracle OCI 18c call timeout value.

5 years agoDon't skip RECV instuctions when function uses type hints
Dmitry Stogov [Fri, 1 Nov 2019 06:33:46 +0000 (09:33 +0300)]
Don't skip RECV instuctions when function uses type hints

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Thu, 31 Oct 2019 15:10:18 +0000 (16:10 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix test cases for libxml2 2.9.10

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 31 Oct 2019 15:09:38 +0000 (16:09 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix test cases for libxml2 2.9.10

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Thu, 31 Oct 2019 15:08:38 +0000 (16:08 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix test cases for libxml2 2.9.10

5 years agoFix test cases for libxml2 2.9.10
Christoph M. Becker [Thu, 31 Oct 2019 15:02:05 +0000 (16:02 +0100)]
Fix test cases for libxml2 2.9.10

Since the error reporting has been slightly changed, we have to adapt
the two affected test cases.

5 years agoAdd stubs for WeakReference
Nikita Popov [Thu, 31 Oct 2019 11:17:04 +0000 (12:17 +0100)]
Add stubs for WeakReference

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 31 Oct 2019 10:34:15 +0000 (11:34 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Remove configure checks for supported instruction sets

5 years agoRemove configure checks for supported instruction sets
Nikita Popov [Thu, 31 Oct 2019 10:27:53 +0000 (11:27 +0100)]
Remove configure checks for supported instruction sets

These were checking whether the instruction set is supported by
the host CPU, however they were only used to condition on whether
this instruction set is targeted at all. It would still use dynamic
dispatch (e.g. based on ifunc resolvers) to select the actual
implementation. Whether the target is guaranteed to support the
instruction set without dispatch is determined based on pre-defined
macros like __SSE2__.

This removes the configure-time builtin cpu checks to remove
confusion. Additionally this allows targeting an architecture that
is newer than the host architecture.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 31 Oct 2019 08:37:27 +0000 (09:37 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix bug #77930: Remove mmap limit

5 years agoFix bug #77930: Remove mmap limit
Nikita Popov [Wed, 30 Oct 2019 12:15:05 +0000 (13:15 +0100)]
Fix bug #77930: Remove mmap limit

First, the limitation already doesn't trigger if you copy the whole
file (i.e. use copy() or stream_copy_to_stream() and don't specify
a length). This happens because length will be 0 at the time of the
check and only later calculated based on the file size. This means
that we're already completely blowing the length limit for what is
likely the most common case, and it doesn't seem like anyone complained
about that.

Second, the premise of the code comment ("to avoid runaway swapping")
seems incorrect to me. Because this performs a file-backed non-private
mmap, no swap backing is needed for the mapping. Concerns over "memory
usage" are also misplaced, as this is a virtual mapping.

5 years agoElevate warnings to ValueErrors in ext/calendar
Christoph M. Becker [Mon, 28 Oct 2019 07:53:56 +0000 (08:53 +0100)]
Elevate warnings to ValueErrors in ext/calendar

All of these warnings/ValueErrors are due to programming errors, i.e.
calling a function with unsupported arguments.

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Wed, 30 Oct 2019 18:50:22 +0000 (19:50 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #78761: Zend memory heap corruption with preload and casting

5 years agoFix #78761: Zend memory heap corruption with preload and casting
Christoph M. Becker [Wed, 30 Oct 2019 17:05:10 +0000 (18:05 +0100)]
Fix #78761: Zend memory heap corruption with preload and casting

We have to reset `FFI_G(persistent)` back to zero when preloading has
finished.

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Wed, 30 Oct 2019 16:22:56 +0000 (17:22 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #78762: Failing FFI::cast() may leak memory

5 years agoFix #78762: Failing FFI::cast() may leak memory
Christoph M. Becker [Wed, 30 Oct 2019 16:16:56 +0000 (17:16 +0100)]
Fix #78762: Failing FFI::cast() may leak memory

We have to release objects when we're done with them.

5 years agoCleanup return values when parameter parsing is unsuccessful
Máté Kocsis [Tue, 29 Oct 2019 16:16:27 +0000 (17:16 +0100)]
Cleanup return values when parameter parsing is unsuccessful

5 years agoCleanup return values for Intl when parameter parsing is unsuccessful
Máté Kocsis [Tue, 29 Oct 2019 14:45:46 +0000 (15:45 +0100)]
Cleanup return values for Intl when parameter parsing is unsuccessful

Closes GH-4871.

5 years agoDon't use chunking for stream writes
Nikita Popov [Thu, 18 Jul 2019 15:02:29 +0000 (17:02 +0200)]
Don't use chunking for stream writes

We're currently splitting up large writes into 8K size chunks, which
adversely affects I/O performance in some cases. Splitting up writes
doesn't make a lot of sense, as we already must have a backing buffer,
so there is no memory/performance tradeoff to be made here.

This change disables the write chunking at the stream layer, but
retains the current retry loop for partial writes. In particular
network writes will typically only write part of the data for large
writes, so we need to keep the retry loop to preserve backwards
compatibility.

If issues due to this change turn up, chunking should be reintroduced
at lower levels where it is needed to avoid issues for specific streams,
rather than unnecessarily enforcing it for all streams.