]> granicus.if.org Git - php/log
php
4 years agoTreat attribute argument lists like normal argument lists
Nikita Popov [Thu, 2 Jul 2020 13:27:45 +0000 (15:27 +0200)]
Treat attribute argument lists like normal argument lists

Allow trailing comma. Syntactically allow unpacking, but forbid it
during compilation.

The trailing comma test-case is adopted from GH-5796.

4 years agoAdd support for forcing regeneration of arginfo files
Máté Kocsis [Thu, 2 Jul 2020 12:46:06 +0000 (14:46 +0200)]
Add support for forcing regeneration of arginfo files

Closes GH-5795

4 years agoLoad constant value only if necessary
Dmitry Stogov [Thu, 2 Jul 2020 11:43:17 +0000 (14:43 +0300)]
Load constant value only if necessary

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Thu, 2 Jul 2020 10:24:49 +0000 (12:24 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Extract test helper function for SeCreateSymbolicLinkPrivilege check

4 years agoExtract test helper function for SeCreateSymbolicLinkPrivilege check
Christoph M. Becker [Thu, 2 Jul 2020 09:56:41 +0000 (11:56 +0200)]
Extract test helper function for SeCreateSymbolicLinkPrivilege check

4 years agoUpdate to PCRE2 10.35
Christoph M. Becker [Thu, 2 Jul 2020 08:24:58 +0000 (10:24 +0200)]
Update to PCRE2 10.35

We also port a fix for the build system regarding the `-fcf-protection`
gcc flag; cf. <https://bugs.exim.org/show_bug.cgi?id=2578>.

4 years agoRemove leftover debug comment
Nikita Popov [Thu, 2 Jul 2020 09:51:51 +0000 (11:51 +0200)]
Remove leftover debug comment

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 2 Jul 2020 09:44:34 +0000 (11:44 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Handle SO_ options only at SOL_SOCKET level
  Allow different error message for errno 58

4 years agoEliminate useless exception checks
Dmitry Stogov [Thu, 2 Jul 2020 09:42:09 +0000 (12:42 +0300)]
Eliminate useless exception checks

4 years agoHandle SO_ options only at SOL_SOCKET level
Nikita Popov [Thu, 2 Jul 2020 08:50:27 +0000 (10:50 +0200)]
Handle SO_ options only at SOL_SOCKET level

These options may have the same value as options at other levels.

This issue showed up on ppc64el.

4 years agoUse correct ZPP mechanism in get_class_methods()
codinghuang [Wed, 1 Jul 2020 14:49:57 +0000 (22:49 +0800)]
Use correct ZPP mechanism in get_class_methods()

From now on, instead of returning null, an exception is thrown when
not a string or an object is passed to the function.

Closes GH-5792

4 years agoAllow different error message for errno 58
Nikita Popov [Wed, 1 Jul 2020 15:19:32 +0000 (17:19 +0200)]
Allow different error message for errno 58

Apparently this is EDEADLOCK on some systems.

4 years agoSkip enchant test under asan
Nikita Popov [Thu, 2 Jul 2020 09:37:09 +0000 (11:37 +0200)]
Skip enchant test under asan

There is a known memory leak here:
https://bugs.launchpad.net/ubuntu/+source/enchant/+bug/305468

4 years agoCheck that "tokenizer" extension is available in gen_stub.php
Nikita Popov [Thu, 2 Jul 2020 08:36:57 +0000 (10:36 +0200)]
Check that "tokenizer" extension is available in gen_stub.php

4 years agoAdd iterator get_gc function for generators
Nikita Popov [Wed, 1 Jul 2020 10:03:13 +0000 (12:03 +0200)]
Add iterator get_gc function for generators

Closes GH-5787.

4 years agoAdd get_gc handle for object iterators
Nikita Popov [Wed, 1 Jul 2020 09:49:44 +0000 (11:49 +0200)]
Add get_gc handle for object iterators

Optional handler with the same semantics as the object handler.

4 years ago[ci skip] (Hopefully) clarify meaning
Christoph M. Becker [Wed, 1 Jul 2020 10:04:54 +0000 (12:04 +0200)]
[ci skip] (Hopefully) clarify meaning

4 years agoDocument zend_hash_sort and zend_ts_hash_sort signature change
Christoph M. Becker [Wed, 1 Jul 2020 08:11:58 +0000 (10:11 +0200)]
Document zend_hash_sort and zend_ts_hash_sort signature change

Cf. <https://github.com/php/php-src/pull/3936>.

4 years agoAdd ldap_count_references()
Paweł Tomulik [Tue, 30 Jun 2020 14:12:12 +0000 (16:12 +0200)]
Add ldap_count_references()

Closes GH-5784

4 years agoFix typos in comments
Fabien Villepinte [Wed, 1 Jul 2020 07:08:28 +0000 (09:08 +0200)]
Fix typos in comments

4 years agoReplace ISO_8859-* with ISO8859-* aliases for MBString
Christoph M. Becker [Tue, 30 Jun 2020 07:20:06 +0000 (09:20 +0200)]
Replace ISO_8859-* with ISO8859-* aliases for MBString

We also remove the mbregex ISO 8859 aliases with underscores.

4 years agoRemove generator iterator member
Nikita Popov [Tue, 30 Jun 2020 16:26:29 +0000 (18:26 +0200)]
Remove generator iterator member

This is probably a leftover from the PHP 5 implementation, where
the iterator was embedded directly in the generator.

4 years agoRevert "Update to PCRE2 10.35"
Nikita Popov [Tue, 30 Jun 2020 16:24:48 +0000 (18:24 +0200)]
Revert "Update to PCRE2 10.35"

This reverts commit b419f96c626d1f9cbbba42698e947e32a0af9c4f.

This breaks the GCC build with -fcf-protection (default on Ubuntu
at least).

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 30 Jun 2020 15:33:51 +0000 (17:33 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Remove bogus generator iterator dtor

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 30 Jun 2020 15:33:33 +0000 (17:33 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Remove bogus generator iterator dtor

4 years agoRemove bogus generator iterator dtor
Nikita Popov [Tue, 30 Jun 2020 15:28:47 +0000 (17:28 +0200)]
Remove bogus generator iterator dtor

Fixes a use-after-free encountered in Symfony's SecurityBundle.
I don't have a reproducer for this, and believe the issue can only
occur if we leak an iterator (the leak is a separate issue).

We should not free the generator iterator here, because we do not
own it. The code that fetched the iterator is responsible for
releasing it. In the rare case where we do hit this code-path,
we cause a use-after-free.

4 years agoUpdate to PCRE2 10.35
Christoph M. Becker [Tue, 30 Jun 2020 14:08:27 +0000 (16:08 +0200)]
Update to PCRE2 10.35

4 years agoPromote warning to exception in ldap_set_rebind_proc()
Paweł Tomulik [Wed, 24 Jun 2020 14:14:29 +0000 (16:14 +0200)]
Promote warning to exception in ldap_set_rebind_proc()

From now on, ldap_set_rebind_proc() will only accept callable or null
as argument 2.

Closes GH-5763

4 years agoUpdate outdated arginfo hashes
Máté Kocsis [Tue, 30 Jun 2020 14:02:11 +0000 (16:02 +0200)]
Update outdated arginfo hashes

4 years agoAssume offsetof() exists
Nikita Popov [Tue, 30 Jun 2020 12:39:49 +0000 (14:39 +0200)]
Assume offsetof() exists

This is a standard C macro. Define XtOffsetOf as an alias for
compatibility, as this is the name we use in most code right now.

4 years agoRemove unnecessary ieeefp.h include
Nikita Popov [Tue, 30 Jun 2020 12:40:15 +0000 (14:40 +0200)]
Remove unnecessary ieeefp.h include

This was needed when php_config.h also declare compatibility
shims for isinf() and friends. These are no longer present in
master, so drop this include.

4 years agoAdd upgrading note for apache module name
Nikita Popov [Tue, 30 Jun 2020 13:53:33 +0000 (15:53 +0200)]
Add upgrading note for apache module name

[ci skip]

4 years agoExtract some common fuzzer code
Nikita Popov [Tue, 30 Jun 2020 13:05:02 +0000 (15:05 +0200)]
Extract some common fuzzer code

4 years agoAdd unserializehash fuzzer.
Eddie Kohler [Sat, 27 Jun 2020 04:16:43 +0000 (21:16 -0700)]
Add unserializehash fuzzer.

Unlike the straight unserialize fuzzer, this runs only on HashContexts,
and it does an update and finalize on the contexts it creates.

Co-authored-by: Nikita Popov <nikic@php.net>
4 years agoMake HashContexts serializable.
Eddie Kohler [Mon, 8 Jun 2020 12:29:42 +0000 (08:29 -0400)]
Make HashContexts serializable.

* Modify php_hash_ops to contain the algorithm name and
  serialize and unserialize methods.

* Implement __serialize and __unserialize magic methods on
  HashContext.

Note that serialized HashContexts are not necessarily portable
between PHP versions or from architecture to architecture.
(Most are, though Keccak and slow SHA3s are not.)

An exception is thrown when an unsupported serialization is
attempted.

Because of security concerns, HASH_HMAC contexts are not
currently serializable; attempting to serialize one throws
an exception.

Serialization exposes the state of HashContext memory, so ensure
that memory is zeroed before use by allocating it with a new
php_hash_alloc_context function. Performance impact is
negligible.

Some hash internal states have logical pointers into a buffer,
or sponge, that absorbs input provided in bytes rather than
chunks. The unserialize functions for these hash functions
must validate that the logical pointers are all within bounds,
lest future hash operations cause out-of-bounds memory accesses.

* Adler32, CRC32, FNV, joaat: simple state, no buffer positions
* Gost, MD2, SHA3, Snefru, Tiger, Whirlpool: buffer positions
  must be validated
* MD4, MD5, SHA1, SHA2, haval, ripemd: buffer positions encoded
  bitwise, forced to within bounds on use; no need to validate

4 years agoMark Keccak functions that contain expected misaligned accesses.
Eddie Kohler [Sat, 27 Jun 2020 04:12:51 +0000 (21:12 -0700)]
Mark Keccak functions that contain expected misaligned accesses.

To avoid undefined behavior warnings for those accesses.

4 years agoMove __alignof__ support check into main configure.ac.
Eddie Kohler [Sat, 27 Jun 2020 13:01:06 +0000 (09:01 -0400)]
Move __alignof__ support check into main configure.ac.

4 years agoSHA-3 Keccak_Hash: Store Keccak_HashInstance in the main context.
Eddie Kohler [Mon, 22 Jun 2020 03:08:22 +0000 (23:08 -0400)]
SHA-3 Keccak_Hash: Store Keccak_HashInstance in the main context.

Previously, the Keccak_HashInstance was separately allocated.
This could cause memory leaks on errors. For instance,
in php_hash_do_hash_hmac, the following code cleans up after
a file read error:

    if (n < 0) {
     efree(context);
     efree(K);
     zend_string_release(digest);
     RETURN_FALSE;
    }

This does not call the context's hash_final operation, which
was the only way to free the separately-allocated Keccak state.

The simplest fix is simply to place the Keccak_HashInstance state
inside the context object. Then it doesn't need to be freed.

As a result, there is no need to call hash_final in the
HashContext destructor: HashContexts cannot contain internally
allocated resources.

4 years agoImprove "VirtualProtect() failed" error messages
Christoph M. Becker [Tue, 30 Jun 2020 07:52:39 +0000 (09:52 +0200)]
Improve "VirtualProtect() failed" error messages

When `mprotect()` fails, the error message contains `errno` and the
respective `strerror()`; we add basically the same info on Windows.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 30 Jun 2020 10:26:03 +0000 (12:26 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix leak when setting cyclic previous exception in finally

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 30 Jun 2020 10:25:29 +0000 (12:25 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix leak when setting cyclic previous exception in finally

4 years agoFix leak when setting cyclic previous exception in finally
Nikita Popov [Tue, 30 Jun 2020 10:22:41 +0000 (12:22 +0200)]
Fix leak when setting cyclic previous exception in finally

A curious exception handling pattern found in Symfony's HttpClient.

4 years agoAdd ZPP macros for class name or object parameters
Máté Kocsis [Tue, 30 Jun 2020 09:14:58 +0000 (11:14 +0200)]
Add ZPP macros for class name or object parameters

Closes GH-5647

4 years agoFix leak in isDefaultValueAvailable()
Nikita Popov [Tue, 30 Jun 2020 09:16:13 +0000 (11:16 +0200)]
Fix leak in isDefaultValueAvailable()

Exposed in Symfony due to exit changes.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 30 Jun 2020 08:48:58 +0000 (10:48 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #70362: Can't copy() large 'data://' with open_basedir

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 30 Jun 2020 08:47:49 +0000 (10:47 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #70362: Can't copy() large 'data://' with open_basedir

4 years agoFix #70362: Can't copy() large 'data://' with open_basedir
Christoph M. Becker [Thu, 5 Mar 2020 11:20:04 +0000 (12:20 +0100)]
Fix #70362: Can't copy() large 'data://' with open_basedir

open_basedir is only relevant for plain files, so there is no need to
check it for other URL wrappers.

4 years agoMove to alpha2 section
Xinchen Hui [Tue, 30 Jun 2020 06:21:33 +0000 (14:21 +0800)]
Move to alpha2 section

4 years agoReplace EXPECTF when possible
Fabien Villepinte [Mon, 29 Jun 2020 19:31:44 +0000 (21:31 +0200)]
Replace EXPECTF when possible

Closes GH-5779

4 years agoTracing JIT support for include() and generators
Dmitry Stogov [Mon, 29 Jun 2020 18:40:49 +0000 (21:40 +0300)]
Tracing JIT support for include() and generators

4 years agoDon't record "fake" closures
Dmitry Stogov [Mon, 29 Jun 2020 17:37:50 +0000 (20:37 +0300)]
Don't record "fake" closures

4 years agoFix macro redifinition warnings in debug builds
Christoph M. Becker [Mon, 29 Jun 2020 15:25:45 +0000 (17:25 +0200)]
Fix macro redifinition warnings in debug builds

MSVC considers these warnings[1] to be severe (level 1), so we better
fix the respective code.

[1] <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005?view=vs-2019>

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 29 Jun 2020 17:06:56 +0000 (19:06 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #63208: BSTR to PHP string conversion not binary safe

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 29 Jun 2020 17:05:37 +0000 (19:05 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #63208: BSTR to PHP string conversion not binary safe

4 years agoFix #63208: BSTR to PHP string conversion not binary safe
Christoph M. Becker [Mon, 29 Jun 2020 15:38:14 +0000 (17:38 +0200)]
Fix #63208: BSTR to PHP string conversion not binary safe

A `BSTR` is similar to a `zend_string`; it stores the length of the
string just before the actual string, and thus the string may contain
NUL bytes.  However, `php_com_olestring_to_string()` is supposed to
deal with arbitrary `OLECHAR*`s which may not be `BSTR`s, so we
introduce `php_com_bstr_to_string()` and use it for the only case where
we actually have to deal with `BSTR`s which may contain NUL bytes.

Contrary to `php_com_olestring_to_string()` we return a `zend_string`,
so we can save the re-allocation when converting to a `zval`.

We also cater to `php_com_string_to_olestring()` not being binary safe,
with basically the same fix we did for `php_com_olestring_to_string()`.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 29 Jun 2020 15:47:21 +0000 (17:47 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79756: finfo_file crash (FILEINFO_MIME)

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 29 Jun 2020 15:46:31 +0000 (17:46 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79756: finfo_file crash (FILEINFO_MIME)

4 years agoFix #79756: finfo_file crash (FILEINFO_MIME)
Christoph M. Becker [Mon, 29 Jun 2020 14:10:33 +0000 (16:10 +0200)]
Fix #79756: finfo_file crash (FILEINFO_MIME)

If `ctime` or `asctime` return `NULL`, we must not attempt to copy the
buffer, but rather return `NULL` as well.

4 years agoFix #79749: Converting FFI instances to bool fails
Christoph M. Becker [Mon, 29 Jun 2020 13:39:17 +0000 (15:39 +0200)]
Fix #79749: Converting FFI instances to bool fails

Casting objects to bool is supposed to yield `true`.  Since the
`cast_object` handler is required now, we have to implement the
`_IS_BOOL` conversion there.

4 years agoDon't accept objects instead of arrays in curl
Nikita Popov [Fri, 26 Jun 2020 10:35:52 +0000 (12:35 +0200)]
Don't accept objects instead of arrays in curl

This properly addresses the issue from bug #79741. Silently
interpreting objects as mangled property tables is almost
always a bad idea.

Closes GH-5773.

4 years agoMake exit() unwind properly
Nikita Popov [Fri, 6 Mar 2020 13:57:55 +0000 (14:57 +0100)]
Make exit() unwind properly

exit() is now internally implemented by throwing an exception,
performing a normal stack unwind and a clean shutdown. This ensures
that no persistent resource leaks occur.

The exception is internal, cannot be caught and does not result in
the execution of finally blocks. This may be relaxed in the future.

Closes GH-5768.

4 years agoFixed bug #79743 (Fatal error when assigning to array property with JIT enabled)
Xinchen Hui [Mon, 29 Jun 2020 09:47:21 +0000 (17:47 +0800)]
Fixed bug #79743 (Fatal error when assigning to array property with JIT enabled)

simple typo

4 years agoImplement Attribute Amendments.
Martin Schröder [Sun, 28 Jun 2020 17:16:33 +0000 (19:16 +0200)]
Implement Attribute Amendments.

RFC: https://wiki.php.net/rfc/attribute_amendments

Support for attribute grouping is left out, because the short
attribute syntax RFC will likely make it obsolete.

Closes GH-5751.

4 years agoFixed bug #79737 (Building embed as static fails during install step).
Dmitry Stogov [Mon, 29 Jun 2020 08:14:20 +0000 (11:14 +0300)]
Fixed bug #79737 (Building embed as static fails during install step).

4 years agoRemove restriction on method call inlining
Nikita Popov [Mon, 29 Jun 2020 07:54:31 +0000 (09:54 +0200)]
Remove restriction on method call inlining

In PHP 8, we are guaranteed that $this exists, so we no longer have
to forbid this case.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 29 Jun 2020 07:53:09 +0000 (09:53 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Don't inline static call to instance method

4 years agoDon't inline static call to instance method
Nikita Popov [Mon, 29 Jun 2020 07:52:37 +0000 (09:52 +0200)]
Don't inline static call to instance method

Fixes the failure in bug79740.phpt with opcache.

4 years agoDrop non-well formed numeric strings from math function tests
George Peter Banyard [Fri, 26 Jun 2020 19:14:24 +0000 (21:14 +0200)]
Drop non-well formed numeric strings from math function tests

4 years agoDrop non-well numeric string in Intl test
George Peter Banyard [Sun, 28 Jun 2020 15:49:54 +0000 (17:49 +0200)]
Drop non-well numeric string in Intl test

4 years agoDrop non-well formed numeric strings in array function tests
George Peter Banyard [Sun, 28 Jun 2020 16:03:10 +0000 (18:03 +0200)]
Drop non-well formed numeric strings in array function tests

4 years agoDrop non-well formed numeric strings in strings function tests
George Peter Banyard [Sun, 28 Jun 2020 16:13:43 +0000 (18:13 +0200)]
Drop non-well formed numeric strings in strings function tests

4 years agoSimplify and fix php-cgi detection
Nikita Popov [Fri, 26 Jun 2020 10:46:04 +0000 (12:46 +0200)]
Simplify and fix php-cgi detection

Make it work for installed PHP binaries.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 26 Jun 2020 10:29:43 +0000 (12:29 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79741

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 26 Jun 2020 10:29:23 +0000 (12:29 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79741

4 years agoFixed bug #79741
Nikita Popov [Fri, 26 Jun 2020 10:26:46 +0000 (12:26 +0200)]
Fixed bug #79741

4 years agoHaiku proc_open build fix, *pty api resides on the BSD library
David Carlier [Fri, 26 Jun 2020 09:23:52 +0000 (09:23 +0000)]
Haiku proc_open build fix, *pty api resides on the BSD library

Closes GH-5770.

4 years agoBetter leak fix for cgi -s / -w
Nikita Popov [Fri, 26 Jun 2020 09:07:55 +0000 (11:07 +0200)]
Better leak fix for cgi -s / -w

We also need to go through request shutdown. The naming is a bit
confusing, but it's fine to go through fastcgi_request_done even
if not using fastcgi. Whether we loop or not is checked separately.

4 years agoCache __unserialize() instead of unserialize()
Nikita Popov [Fri, 26 Jun 2020 08:54:40 +0000 (10:54 +0200)]
Cache __unserialize() instead of unserialize()

We should use these cache slots for the new object serialization
mechanism rather than the old one.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 26 Jun 2020 08:32:40 +0000 (10:32 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79740

4 years agoFixed bug #79740
Nikita Popov [Fri, 26 Jun 2020 08:31:55 +0000 (10:31 +0200)]
Fixed bug #79740

4 years agoUse cheaper zend_hash_find_ex() to handle IS_CONST index
Dmitry Stogov [Fri, 26 Jun 2020 08:18:04 +0000 (11:18 +0300)]
Use cheaper zend_hash_find_ex() to handle IS_CONST index

4 years agoFix uninitialized reads in min/max
Nikita Popov [Fri, 26 Jun 2020 07:36:17 +0000 (09:36 +0200)]
Fix uninitialized reads in min/max

We need to use the unstable comparison function here, the fallback
order is not initialized in this context.

4 years agoClear last error before shutting down memory manager
Nikita Popov [Thu, 25 Jun 2020 14:12:55 +0000 (16:12 +0200)]
Clear last error before shutting down memory manager

The last error is allocated using ZMM, make sure it's cleared
beforehand.

It would probably be better to allocate it persistently outside
of requests.

4 years ago[ci skip] Various typo fixes in stub comments and CHANGES file
Ayesh Karunaratne [Thu, 25 Jun 2020 20:45:29 +0000 (03:45 +0700)]
[ci skip] Various typo fixes in stub comments and CHANGES file

4 years agoFixed incorrect type guard
Dmitry Stogov [Thu, 25 Jun 2020 18:59:48 +0000 (21:59 +0300)]
Fixed incorrect type guard

4 years agoMove exception check to cold path.
Dmitry Stogov [Thu, 25 Jun 2020 17:11:23 +0000 (20:11 +0300)]
Move exception check to cold path.

4 years agoOptimization for +/- int(0)
Dmitry Stogov [Thu, 25 Jun 2020 16:09:54 +0000 (19:09 +0300)]
Optimization for +/- int(0)

4 years agoImprove tracing JIT for FETCH_THIS + FETCH_OBJ_*
Dmitry Stogov [Thu, 25 Jun 2020 14:33:53 +0000 (17:33 +0300)]
Improve tracing JIT for FETCH_THIS + FETCH_OBJ_*

4 years agoFix leaks in cgi strip/highlight mode
Nikita Popov [Thu, 25 Jun 2020 14:06:20 +0000 (16:06 +0200)]
Fix leaks in cgi strip/highlight mode

4 years agoFix leaks in Phar::webPhar()
Nikita Popov [Thu, 25 Jun 2020 13:42:32 +0000 (15:42 +0200)]
Fix leaks in Phar::webPhar()

4 years agoDon't throw warning if exception thrown during dom validation
Nikita Popov [Thu, 25 Jun 2020 13:24:01 +0000 (15:24 +0200)]
Don't throw warning if exception thrown during dom validation

4 years agoAvoid warning on exception in xsl ext
Nikita Popov [Thu, 25 Jun 2020 13:06:53 +0000 (15:06 +0200)]
Avoid warning on exception in xsl ext

4 years agoensure all files have same date in official archives
Remi Collet [Thu, 25 Jun 2020 12:38:49 +0000 (14:38 +0200)]
ensure all files have same date in official archives

4 years agoAvoid $this check
Dmitry Stogov [Thu, 25 Jun 2020 11:08:21 +0000 (14:08 +0300)]
Avoid $this check

4 years agoCheaper exception checks
Dmitry Stogov [Thu, 25 Jun 2020 10:23:43 +0000 (13:23 +0300)]
Cheaper exception checks

4 years agoDon't include trailing newline in comment token
Nikita Popov [Sat, 15 Feb 2020 16:54:02 +0000 (17:54 +0100)]
Don't include trailing newline in comment token

Don't include a trailing newline in T_COMMENT tokens, instead leave
it for a following T_WHITESPACE token. The newline does not belong
to the comment logically, and this makes for an ugly special case,
as other tokens do not include trailing newlines.

Whitespace-sensitive tooling will want to either forward or backward
emulate this change.

Closes GH-5182.

4 years agoMake sorting stable
Nikita Popov [Wed, 4 Mar 2020 10:52:55 +0000 (11:52 +0100)]
Make sorting stable

Make user-exposed sorts stable, by storing the position of elements
in the original array, and using those positions as a fallback
comparison criterion. The base sort is still hybrid q/insert.

The use of true/false comparison functions is deprecated (but still
supported) and should be replaced by -1/0/1 comparison functions,
driven by the <=> operator.

RFC: https://wiki.php.net/rfc/stable_sorting

Closes GH-5236.

4 years agoIncrease timeout on sanitizer job
Nikita Popov [Thu, 25 Jun 2020 08:36:19 +0000 (10:36 +0200)]
Increase timeout on sanitizer job

This is starting to hit the limit. Let it run for 3:30 hours.

4 years agoDon't use iterator_funcs_ptr if it is null
Nikita Popov [Thu, 25 Jun 2020 08:30:40 +0000 (10:30 +0200)]
Don't use iterator_funcs_ptr if it is null

This avoids ubsan warnings. Alternatively we could always initialize
iterator_funcs_ptr for aggregates, instead of doing so only for
non-internal ones.

4 years agoRemove useless prototype for spl_heap_get_iterator
Alex Dowad [Tue, 12 May 2020 18:46:05 +0000 (20:46 +0200)]
Remove useless prototype for spl_heap_get_iterator