]> granicus.if.org Git - php/log
php
4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 21 Feb 2020 09:32:45 +0000 (10:32 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Add test for bug #78569

4 years agoAdd test for bug #78569
Christoph M. Becker [Fri, 21 Feb 2020 09:30:51 +0000 (10:30 +0100)]
Add test for bug #78569

4 years agoUpdate Ubuntu version on Azure
Nikita Popov [Thu, 20 Feb 2020 14:05:04 +0000 (15:05 +0100)]
Update Ubuntu version on Azure

The i386 and community jobs were still on 16.04, update them to
18.04.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 20 Feb 2020 09:56:29 +0000 (10:56 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix NEWS [ci skip]

4 years agoFix NEWS [ci skip]
Christoph M. Becker [Thu, 20 Feb 2020 09:55:17 +0000 (10:55 +0100)]
Fix NEWS [ci skip]

Cosmetics.

4 years agoDon't use VLA in mysqlnd auth
Nikita Popov [Tue, 18 Feb 2020 15:17:34 +0000 (16:17 +0100)]
Don't use VLA in mysqlnd auth

We use alloca instead of VLA. This should also allow building
this code on Windows.

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

* PHP-7.3:
  Remove extra tab in NEWS [ci skip]

4 years agoRemove extra tab in NEWS [ci skip]
Christoph M. Becker [Tue, 18 Feb 2020 10:09:37 +0000 (11:09 +0100)]
Remove extra tab in NEWS [ci skip]

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Remi Collet [Tue, 18 Feb 2020 10:01:07 +0000 (11:01 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  bump version to 7.2.29

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Remi Collet [Tue, 18 Feb 2020 10:00:49 +0000 (11:00 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  bump version to 7.2.29

4 years agobump version to 7.2.29
Remi Collet [Tue, 18 Feb 2020 10:00:28 +0000 (11:00 +0100)]
bump version to 7.2.29

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 17 Feb 2020 21:53:50 +0000 (22:53 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79038: PDOStatement::nextRowset() leaks column values

4 years agoFix #79038: PDOStatement::nextRowset() leaks column values
Christoph M. Becker [Fri, 27 Dec 2019 12:20:11 +0000 (13:20 +0100)]
Fix #79038: PDOStatement::nextRowset() leaks column values

Firstly, we must not rely on `stmt->column_count` when freeing the
driver specific column values, but rather store the column count in
the driver data.  Since the column count is a `short`, 16 bit are
sufficient, so we can store it in reserved bits of `pdo_odbc_stmt`.

Furthermore, we must not allocate new column value storage when the
statement is not executed, but rather when the column value storage has
not been allocated.

Finally, we have to introduce a driver specific `cursor_closer` to
avoid that `::closeCursor()` calls `odbc_stmt_next_rowset()` which then
frees the column value storage, because it may be still needed for
bound columns.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 17 Feb 2020 18:36:07 +0000 (19:36 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix NEWS [ci skip]

4 years agoFix NEWS [ci skip]
Christoph M. Becker [Mon, 17 Feb 2020 18:35:42 +0000 (19:35 +0100)]
Fix NEWS [ci skip]

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 17 Feb 2020 18:24:04 +0000 (19:24 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Update NEWS [ci skip]

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Mon, 17 Feb 2020 18:22:15 +0000 (19:22 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Update NEWS [ci skip]

4 years agoUpdate NEWS [ci skip]
Christoph M. Becker [Mon, 17 Feb 2020 18:21:51 +0000 (19:21 +0100)]
Update NEWS [ci skip]

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 17 Feb 2020 18:08:22 +0000 (19:08 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix # 79171: heap-buffer-overflow in phar_extract_file
  Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions
  Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress
  Mark bug76348.phpt as online test
  Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions
  Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Mon, 17 Feb 2020 18:08:04 +0000 (19:08 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Mark bug76348.phpt as online test
  Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions
  Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress

4 years agoCreate a new console for each test worker on Windows
Christoph M. Becker [Wed, 12 Feb 2020 13:34:48 +0000 (14:34 +0100)]
Create a new console for each test worker on Windows

The primary motivation to have each test worker running its own console
is to allow the windows_mb_path tests to run in parallel.  A nice side
effect is that this also prevents changing the code page of the
tester's console window (which can even cause its font to be changed).

To be able to do so, we introduce the `create_new_console` option for
`proc_open()`, which might occasionally be useful for other purposes
than testing.

4 years agoDisable instantiation of zero size FFI\CData objects
Dmitry Stogov [Mon, 17 Feb 2020 09:48:55 +0000 (12:48 +0300)]
Disable instantiation of zero size FFI\CData objects

4 years agoFix # 79171: heap-buffer-overflow in phar_extract_file
Christoph M. Becker [Sun, 26 Jan 2020 15:03:35 +0000 (16:03 +0100)]
Fix # 79171: heap-buffer-overflow in phar_extract_file

We must not access memory outside of the allocated buffer.

4 years agoFix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access...
Stanislav Malyshev [Sun, 16 Feb 2020 06:17:14 +0000 (22:17 -0800)]
Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions

4 years agoFix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress
Stanislav Malyshev [Sun, 16 Feb 2020 04:52:19 +0000 (20:52 -0800)]
Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress

4 years agoFix # 79171: heap-buffer-overflow in phar_extract_file
Christoph M. Becker [Sun, 26 Jan 2020 15:03:35 +0000 (16:03 +0100)]
Fix # 79171: heap-buffer-overflow in phar_extract_file

We must not access memory outside of the allocated buffer.

4 years agoFix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access...
Stanislav Malyshev [Sun, 16 Feb 2020 06:17:14 +0000 (22:17 -0800)]
Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions

4 years agoFix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress
Stanislav Malyshev [Sun, 16 Feb 2020 04:52:19 +0000 (20:52 -0800)]
Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 17 Feb 2020 08:09:12 +0000 (09:09 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79271: DOMDocumentType::$childNodes is NULL

4 years agoFix #79271: DOMDocumentType::$childNodes is NULL
Christoph M. Becker [Fri, 14 Feb 2020 09:55:17 +0000 (10:55 +0100)]
Fix #79271: DOMDocumentType::$childNodes is NULL

Dom level 2 core, DOM level 3 core and the DOM living standard agree
that `childNodes` always return a `NodeList`, and never `null`.

4 years agoMark bug76348.phpt as online test
Nikita Popov [Tue, 19 Mar 2019 14:47:25 +0000 (15:47 +0100)]
Mark bug76348.phpt as online test

4 years agoFix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access...
Stanislav Malyshev [Sun, 16 Feb 2020 06:17:14 +0000 (22:17 -0800)]
Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions

4 years agoFix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress
Stanislav Malyshev [Sun, 16 Feb 2020 04:52:19 +0000 (20:52 -0800)]
Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 14 Feb 2020 08:23:29 +0000 (09:23 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix typo in recent bugfix

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Fri, 14 Feb 2020 08:22:37 +0000 (09:22 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix typo in recent bugfix

4 years agoFix typo in recent bugfix
Christoph M. Becker [Fri, 14 Feb 2020 08:21:13 +0000 (09:21 +0100)]
Fix typo in recent bugfix

4 years agoFix Azure MacOS build
Nikita Popov [Thu, 13 Feb 2020 14:45:39 +0000 (15:45 +0100)]
Fix Azure MacOS build

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 13 Feb 2020 14:15:45 +0000 (15:15 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #77569: Write Acess Violation in DomImplementation

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Thu, 13 Feb 2020 14:14:45 +0000 (15:14 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #77569: Write Acess Violation in DomImplementation

4 years agoFix #77569: Write Acess Violation in DomImplementation
Christoph M. Becker [Thu, 13 Feb 2020 14:13:26 +0000 (15:13 +0100)]
Fix #77569: Write Acess Violation in DomImplementation

We must not assume that the zval IS_STRING.

4 years agoRemove value from comment in php.ini files
Michael Voříšek [Mon, 10 Feb 2020 11:03:57 +0000 (12:03 +0100)]
Remove value from comment in php.ini files

Closes GH-5164.

4 years agoFixed bug #79257
Nikita Popov [Tue, 11 Feb 2020 16:30:59 +0000 (17:30 +0100)]
Fixed bug #79257

Replace an existing entry for a given name only if we have a match.

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

* PHP-7.3:
  Fix #79254: getenv() w/o arguments not showing changes

4 years agoFix #79254: getenv() w/o arguments not showing changes
Christoph M. Becker [Tue, 11 Feb 2020 08:43:15 +0000 (09:43 +0100)]
Fix #79254: getenv() w/o arguments not showing changes

To be able to see changes done only with `SetEnvironmentVariable()`, we
have to use `GetEnvironmentStrings()` instead of `environ`, because the
latter sees only changes done with `putenv()`.

For best backward compatibility we're using `GetEnvironmentStringsA()`;
switching to the wide string version likely makes sense for master,
though.

4 years agoRemove hint to security purpose of disable_functions
jsmmo [Wed, 5 Feb 2020 10:27:33 +0000 (11:27 +0100)]
Remove hint to security purpose of disable_functions

These features are not intended to offer security against a
determined attacher with full local code execution privileges.

Closes GH-5150.

4 years agoFixed bug #79244 (php crashes during parsing INI file). (Laruence)
Xinchen Hui [Mon, 10 Feb 2020 05:01:51 +0000 (13:01 +0800)]
Fixed bug #79244 (php crashes during parsing INI file). (Laruence)

Cherry-picked the fix(not sure why this wasn't merged to 7.4) for:
Fixed bug #77589 (Core dump using parse_ini_string with numeric sections)

Section name should not be typed(NULL, FALSE, TRUE etc)

Conflicts:

Zend/zend_ini_scanner.c

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sat, 8 Feb 2020 16:06:34 +0000 (17:06 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79248: Traversing empty VT_ARRAY throws com_exception

4 years agoFix #79248: Traversing empty VT_ARRAY throws com_exception
Christoph M. Becker [Sat, 8 Feb 2020 15:56:30 +0000 (16:56 +0100)]
Fix #79248: Traversing empty VT_ARRAY throws com_exception

If the `VT_ARRAY` is empty, i.e. its upperbound is less than its lower
bound, we must not call `php_com_safearray_get_elem()`, because that
function throws in this case.

4 years agoFix #79247: Garbage collecting variant objects segfaults
Christoph M. Becker [Sat, 8 Feb 2020 09:58:15 +0000 (10:58 +0100)]
Fix #79247: Garbage collecting variant objects segfaults

variant objects have no (declared) properties, so the `get_properties`
handlers returns a pointer to constant storage for efficiency reasons.
This pointer must not be returned from the `get_gc` handler, though;
instead we set up an own `get_gc` handler and return NULL from it, to
signal that there are no properties to collect.

4 years agoUpdate bundled stdxx check macros
Anatol Belski [Sat, 8 Feb 2020 09:13:46 +0000 (10:13 +0100)]
Update bundled stdxx check macros

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 7 Feb 2020 20:10:44 +0000 (21:10 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Skip test case on x86 where it otherwise fails [ci skip]

4 years agoSkip test case on x86 where it otherwise fails [ci skip]
Christoph M. Becker [Fri, 7 Feb 2020 20:00:27 +0000 (21:00 +0100)]
Skip test case on x86 where it otherwise fails [ci skip]

`-2200000000` can't be converted to integer on x86, so the constructor
call would fail.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 7 Feb 2020 17:04:52 +0000 (18:04 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79242: COM error constants don't match com_exception codes

4 years agoFix #79242: COM error constants don't match com_exception codes
Christoph M. Becker [Fri, 7 Feb 2020 17:04:14 +0000 (18:04 +0100)]
Fix #79242: COM error constants don't match com_exception codes

Because a `HRESULT` is a `LONG`[1], no special treatment is required on
x86 platforms to get appropriate values.  On x64 platforms we prefer
positive values, what we could accomplish by casting the `HRESULT`
value to `ULONG` and then to `zend_long`, but since the current
behavior is correct and the performance improvement is negligible, we
defer that to master.

[1] <https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types#hresult>

4 years agoPCRE: Only remember valid UTF-8 if start offset zero
Nikita Popov [Fri, 7 Feb 2020 16:01:39 +0000 (17:01 +0100)]
PCRE: Only remember valid UTF-8 if start offset zero

PCRE only validates the string starting from the start offset
(minus maximum look-behind, but let's ignore that), so we can
only remember that the string is fully valid UTF-8 is the original
start offset is zero.

4 years agoPCRE: Check whether start offset is on char boundary
Nikita Popov [Fri, 7 Feb 2020 15:39:06 +0000 (16:39 +0100)]
PCRE: Check whether start offset is on char boundary

We need not just the whole string to be UTF-8, but the start
position to be on a character boundary as well. Check this by
looking for a continuation byte.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 6 Feb 2020 14:00:39 +0000 (15:00 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #66322: COMPersistHelper::SaveToFile can save to wrong location

4 years agoFix #66322: COMPersistHelper::SaveToFile can save to wrong location
Christoph M. Becker [Thu, 6 Feb 2020 13:59:55 +0000 (14:59 +0100)]
Fix #66322: COMPersistHelper::SaveToFile can save to wrong location

Saving under the given `filename` may also work, but since
`::LoadFromFile` uses the `fullpath` we follow suit.

4 years agoMake opcodes to return de-refereced values of typed references (in the same was as...
Dmitry Stogov [Thu, 6 Feb 2020 12:48:54 +0000 (15:48 +0300)]
Make opcodes to return de-refereced values of typed references (in the same was as for non-typed)

4 years agoFix NEWS [ci skip]
Christoph M. Becker [Thu, 6 Feb 2020 09:46:38 +0000 (10:46 +0100)]
Fix NEWS [ci skip]

This bugfix didn't make it into 7.4.3.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 5 Feb 2020 10:19:55 +0000 (11:19 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79188

4 years agoFixed bug #79188
Nikita Popov [Wed, 29 Jan 2020 09:57:44 +0000 (10:57 +0100)]
Fixed bug #79188

4 years agoMerge branch 'PHP-7.3' into PHP-7.4 [ci skip]
Christoph M. Becker [Tue, 4 Feb 2020 10:41:07 +0000 (11:41 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4 [ci skip]

* PHP-7.3:
  Next is 7.3.16

4 years agoNext is 7.3.16
Christoph M. Becker [Tue, 4 Feb 2020 10:38:29 +0000 (11:38 +0100)]
Next is 7.3.16

4 years agoFix #79019: Copied cURL handles upload empty file
Christoph M. Becker [Tue, 4 Feb 2020 10:01:33 +0000 (11:01 +0100)]
Fix #79019: Copied cURL handles upload empty file

To cater to `curl_copy_handle()` of cURL handles with attached
`CURLFile`s, we must not attach the opened stream, because the stream
may not be seekable, so that we could rewind, when the same stream is
going to be uploaded multiple times.  Instead, we're opening the stream
lazily in the read callback.

Since `curl_multi_perfom()` processes easy handles asynchronously, we
have no control of the operation sequence.  Since duplicated cURL
handles may be used with multi handles, we cannot use a single arg
structure, but actually have to rebuild the whole mime structure on
handle duplication and attach this to the new handle.

In order to better test this behavior, we extend the test responder to
print the size of the upload, and patch the existing tests accordingly.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 3 Feb 2020 23:44:55 +0000 (00:44 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78090: bug45161.phpt takes forever to finish

4 years agoFix #78090: bug45161.phpt takes forever to finish
Christoph M. Becker [Mon, 3 Feb 2020 10:47:01 +0000 (11:47 +0100)]
Fix #78090: bug45161.phpt takes forever to finish

Not all systems support the discard protocol (TCP port 9), and since
there is no particular reason to use it, we switch to using actual
server testing.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 3 Feb 2020 22:32:46 +0000 (23:32 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79191: Error in SoapClient ctor disables DOMDocument::save()

4 years agoFix #79191: Error in SoapClient ctor disables DOMDocument::save()
Christoph M. Becker [Mon, 3 Feb 2020 22:10:20 +0000 (23:10 +0100)]
Fix #79191: Error in SoapClient ctor disables DOMDocument::save()

The culprit is the too restrictive fix for bug #71536, which prevents
`php_libxml_streams_IO_write()` from properly executing when unclean
shutdown is flagged.  A *more* suitable solution is to move the
`xmlwriter_free_resource_ptr()` call from the `free_obj` handler to an
added `dtor_obj` handler, to avoid to write to a closed stream in case
of late object freeing.  This makes the `EG(active)` guard superfluous.

We also fix bug79029.phpt which has to use different variables for the
three parts to actually check the original shutdown issue.

Thanks to bwoebi and daverandom for helping to investigate this issue.

4 years agoApply tidy formatting
Nikita Popov [Mon, 3 Feb 2020 12:41:31 +0000 (13:41 +0100)]
Apply tidy formatting

Mostly reindent PHP scripts to spaces.

4 years agoAdd tidy.php to enforce formatting
Nikita Popov [Fri, 10 Jan 2020 14:52:42 +0000 (15:52 +0100)]
Add tidy.php to enforce formatting

Many parts are disabled for the PHP-7.4 branch. We only strip
trailing whitespace in C files and reindent .php files to spaces.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 3 Feb 2020 12:05:09 +0000 (13:05 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Relax test expectation

4 years agoRelax test expectation
Christoph M. Becker [Mon, 3 Feb 2020 12:02:12 +0000 (13:02 +0100)]
Relax test expectation

Since we're dealing with floating point numbers, precision issues may
hit us, and actually it's not necessary to check for the exact number
anyway, because it is not exact in the first place.  Therefore, we
relax the test expectations.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 3 Feb 2020 11:29:28 +0000 (12:29 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79212: NumberFormatter::format() may detect wrong type

4 years agoFix #79212: NumberFormatter::format() may detect wrong type
Christoph M. Becker [Sun, 2 Feb 2020 12:38:34 +0000 (13:38 +0100)]
Fix #79212: NumberFormatter::format() may detect wrong type

We have to convert to number *before* detecting the type, to cater to
internal objects implementing `cast_object`.

We also get rid of the fallback behavior of using `FORMAT_TYPE_INT32`,
because that can no longer happen; after `convert_scalar_to_number_ex`
the type is either `IS_LONG` or `IS_DOUBLE`.  We cater explicitly to
the `IS_ARRAY` case what also avoids triggering a type confusion when
`::TYPE_INT64` is passed as `$type`.

4 years agoadd test
Remi Collet [Mon, 3 Feb 2020 09:21:46 +0000 (10:21 +0100)]
add test

4 years agoNEWS
Remi Collet [Mon, 3 Feb 2020 09:09:12 +0000 (10:09 +0100)]
NEWS

4 years agoFixed bug #73119 Wrong return for ZipArchive::addEmptyDir Method
Remi Collet [Mon, 3 Feb 2020 09:06:44 +0000 (10:06 +0100)]
Fixed bug #73119 Wrong return for ZipArchive::addEmptyDir Method

4 years agoAdd WHITESPACE_SENSITIVE run-tests section
Nikita Popov [Fri, 10 Jan 2020 15:54:12 +0000 (16:54 +0100)]
Add WHITESPACE_SENSITIVE run-tests section

This is used to indicate that the test should not be changed by
automated formatting changes.

4 years agoDisable parallelism for FPM tests
Nikita Popov [Mon, 3 Feb 2020 08:57:34 +0000 (09:57 +0100)]
Disable parallelism for FPM tests

Let's see if this helps with spurious failures on Azure.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 31 Jan 2020 09:29:26 +0000 (10:29 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #76047

4 years agoFix bug #76047
Nikita Popov [Fri, 31 Jan 2020 09:21:37 +0000 (10:21 +0100)]
Fix bug #76047

Unlink the current stack frame before freeing CVs or extra args.
This means it will no longer show up in back traces that are
generated during CV destruction.

We already did this prior to destructing the object/closure,
presumably for the same reason.

4 years agoFixed bug #79094 (Crashing when running recursion function)
Dmitry Stogov [Fri, 31 Jan 2020 07:34:04 +0000 (10:34 +0300)]
Fixed bug #79094 (Crashing when running recursion function)

4 years agofix cross compilation failure due to size_t typecast in define
Pascal de Bruijn [Thu, 30 Jan 2020 12:48:44 +0000 (13:48 +0100)]
fix cross compilation failure due to size_t typecast in define

The following commit introduces a cross-compilation failure:

   93c728b77cfb47f5cfdd1863f8982ea59d344205
  "Try to control ZEND_MM_ALIGNED_SIZE type"

br-arm-full/build/php-7.4.2/Zend/zend_alloc.h:30:38:
error: missing binary operator before token "8"
                                              ^
br-arm-full/build/php-7.4.2/ext/opcache/ZendAccelerator.c:1380:7:
note: in expansion of macro ‘ZEND_MM_ALIGNMENT’

Closes GH-5128.

4 years agoFixed bug #79193
Nikita Popov [Thu, 30 Jan 2020 13:55:58 +0000 (14:55 +0100)]
Fixed bug #79193

4 years agoFix live range calculation for FE_FETCH
Nikita Popov [Thu, 30 Jan 2020 13:23:46 +0000 (14:23 +0100)]
Fix live range calculation for FE_FETCH

Op2 is def here, not a use, so treat it accordingly.

4 years agoFix DatePeriod property handling with indirect modification
Nikita Popov [Thu, 30 Jan 2020 12:09:15 +0000 (13:09 +0100)]
Fix DatePeriod property handling with indirect modification

We do need to implement get_property_ptr_ptr to make arrays work
correctly.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 30 Jan 2020 12:05:49 +0000 (13:05 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #70078: XSL callbacks with nodes as parameter leak memory

4 years agoFix #70078: XSL callbacks with nodes as parameter leak memory
Christoph M. Becker [Wed, 29 Jan 2020 17:23:51 +0000 (18:23 +0100)]
Fix #70078: XSL callbacks with nodes as parameter leak memory

The fix for bug #49634 solved a double-free by copying the node with
`xmlDocCopyNodeList()`, but the copied node is later freed by calling
`xmlFreeNode()` instead of `xmlFreeNodeList()`, thus leaking memory.
However, there is no need to treat the node as node list, i.e. to copy
also the node's siblings; just creating a recursive copy of the node
with `xmlDocCopyNode()` is sufficient, while that also avoids the leak.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 30 Jan 2020 11:17:10 +0000 (12:17 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix leak in DateTimeImmutable::modify()

4 years agoFix leak in DateTimeImmutable::modify()
Nikita Popov [Thu, 30 Jan 2020 11:16:43 +0000 (12:16 +0100)]
Fix leak in DateTimeImmutable::modify()

4 years agoFix copying of functions in variance obligations
Nikita Popov [Thu, 30 Jan 2020 10:55:38 +0000 (11:55 +0100)]
Fix copying of functions in variance obligations

Only copy sizeof(zend_internal_function) for internal functions.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 30 Jan 2020 10:21:26 +0000 (11:21 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Add SKIPIF to test requiring mbregex

4 years agoAdd SKIPIF to test requiring mbregex
Nikita Popov [Thu, 30 Jan 2020 10:20:42 +0000 (11:20 +0100)]
Add SKIPIF to test requiring mbregex

4 years agoReset trampoline on executor startup
Nikita Popov [Thu, 30 Jan 2020 10:03:14 +0000 (11:03 +0100)]
Reset trampoline on executor startup

Make sure the trampoline is usable, even if we had an unclean
shutdown on the last request.

4 years agoFix UAF in is_callable() and allocated trampoline
Nikita Popov [Thu, 30 Jan 2020 10:01:13 +0000 (11:01 +0100)]
Fix UAF in is_callable() and allocated trampoline

By nulling out the function_handler, so it will not get used
below. Reuse the existing helper for this purpose.

4 years agoFix shift ub in mbstring
Nikita Popov [Tue, 28 Jan 2020 15:18:46 +0000 (16:18 +0100)]
Fix shift ub in mbstring

Ideally "c" would be an unsigned integer...

4 years agoRestore digit check in mb_decode_numericentity()
Nikita Popov [Wed, 29 Jan 2020 15:40:13 +0000 (16:40 +0100)]
Restore digit check in mb_decode_numericentity()

I replaced it with a multiplication overflow check in
18599f9c52959b2e8cbfac57e278644499a3547d. However, we need both,
because the code for restoring the number can't handle numbers
with many leading zeros right now and I don't feel like teaching it.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 29 Jan 2020 15:19:14 +0000 (16:19 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix mb_ord() crash if internal encoding not supported

4 years agoFix mb_ord() crash if internal encoding not supported
Nikita Popov [Wed, 29 Jan 2020 15:17:30 +0000 (16:17 +0100)]
Fix mb_ord() crash if internal encoding not supported

enc_name can be NULL here. Take the name from the mbfl_encoding
instead.