]> granicus.if.org Git - php/log
php
4 years agoFixed bug #79683
Nikita Popov [Tue, 9 Jun 2020 13:51:05 +0000 (15:51 +0200)]
Fixed bug #79683

Reset fake_scope during __toString() call.

I'll check if we can solve this more globally in master, by
resetting fake_scope in zend_call_function.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 8 Jun 2020 21:22:16 +0000 (23:22 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #74267: segfault with streams and invalid data

4 years agoFix #74267: segfault with streams and invalid data
Christoph M. Becker [Mon, 8 Jun 2020 21:19:43 +0000 (23:19 +0200)]
Fix #74267: segfault with streams and invalid data

If the current character is a line break character, it cannot be a tab
or space character, so we would always fail with an invalid sequence
error.  Obviously, these `scan_stat == 4` conditions are meant to be
exclusive.

Furthermore, if `in_pp == NULL || in_left_p == NULL` is true, we hit a
segfault if we are not returning right away.  Obviously, the additional
constraints don't make sense, so we remove them.

4 years agoFixed bug #79657
Nikita Popov [Mon, 8 Jun 2020 09:31:28 +0000 (11:31 +0200)]
Fixed bug #79657

Throwing an exception should count as an initialization for this
purpose.

4 years agoDisable mysqlnd compression on msan build
Nikita Popov [Mon, 8 Jun 2020 08:35:05 +0000 (10:35 +0200)]
Disable mysqlnd compression on msan build

This recently got enabled when detection was fixed. However,
we don't want this for msan builds, because our zlib is not
instrumented.

4 years agoAllow defining of uname value for reproducible builds
Jelle van der Waa [Fri, 5 Jun 2020 20:50:58 +0000 (22:50 +0200)]
Allow defining of uname value for reproducible builds

Extend configure.ac to accept PHP_UNAME as env variable to set the value of the
PHP_UNAME define in a reproducible manner. This allows distributions to set a
fixed value for php_uname and keep the default behaviour if PHP_UNAME is not
set.

Motivation: https://reproducible-builds.org/

Closes GH-5671.

4 years agoRemove unnecessary "poo" rmdirs
Nikita Popov [Fri, 5 Jun 2020 14:26:09 +0000 (16:26 +0200)]
Remove unnecessary "poo" rmdirs

"poo" was only used in the opendir_edgecases test, but rmdir'ed
in some other tests as well.

I've also taken the liberty of renaming this directory...

4 years agoUpdate intl test suite for ICU 67.1
Christoph M. Becker [Fri, 24 Apr 2020 08:43:42 +0000 (10:43 +0200)]
Update intl test suite for ICU 67.1

Cherry-picked from c915c601710e2a44e6c7f89fcb12b8047c968108.

4 years agoRespect --program-prefix/suffix when installing phar
Nathan Porter [Sat, 30 May 2020 22:39:11 +0000 (15:39 -0700)]
Respect --program-prefix/suffix when installing phar

Currently ./configure --enable-phar --program-suffix=7.4 will
result in binaries named php7.4 and phar but should instead
result in php7.4 and phar7.4

Closes GH-5650.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 4 Jun 2020 11:38:14 +0000 (13:38 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #73527: Invalid memory access in php_filter_strip

4 years agoFix #73527: Invalid memory access in php_filter_strip
Christoph M. Becker [Thu, 4 Jun 2020 09:49:59 +0000 (11:49 +0200)]
Fix #73527: Invalid memory access in php_filter_strip

4 years agomysqlnd: Remove unnecessary check for HAVE_ZLIB
talyz [Wed, 3 Jun 2020 19:21:18 +0000 (21:21 +0200)]
mysqlnd: Remove unnecessary check for HAVE_ZLIB

If MYSQLND_COMPRESSION_WANTED is set, we already guarantee that
zlib is linked, but don't necessarily set HAVE_ZLIB.

Closes GH-5658.

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

* PHP-7.3:
  Fix #79668: get_defined_functions(true) may miss functions

4 years agoFix #79668: get_defined_functions(true) may miss functions
Christoph M. Becker [Wed, 3 Jun 2020 10:05:00 +0000 (12:05 +0200)]
Fix #79668: get_defined_functions(true) may miss functions

Instead of some brittle and unefficient string matching, we can just
check for the function handler.

4 years agoReport len as -1 instead of INT_MAX
Nikita Popov [Wed, 3 Jun 2020 08:15:54 +0000 (10:15 +0200)]
Report len as -1 instead of INT_MAX

Per docs it should be -1. And would be on 32-bit systems, but
not on 64-bit systems.

4 years agoSkip new watch point test under asan
Nikita Popov [Wed, 3 Jun 2020 08:01:57 +0000 (10:01 +0200)]
Skip new watch point test under asan

4 years agoFix #73927: phpdbg fails with windows error prompt at "watch array"
Christoph M. Becker [Wed, 27 May 2020 16:26:32 +0000 (18:26 +0200)]
Fix #73927: phpdbg fails with windows error prompt at "watch array"

We expect zvals, so we should request zvals.

We also suppress spurious watchpoint removal notices.

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

* PHP-7.3:
  Fix #79664: PDOStatement::getColumnMeta fails on empty result set

4 years agoFix #79664: PDOStatement::getColumnMeta fails on empty result set
Christoph M. Becker [Tue, 2 Jun 2020 07:36:39 +0000 (09:36 +0200)]
Fix #79664: PDOStatement::getColumnMeta fails on empty result set

As its name suggests, `sqlite3_data_count` returns the number of
columns in the current row of the result set; we are interested in the
number of columns regardless of the current row, so we have to use
`sqlite3_column_count` instead.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 1 Jun 2020 11:23:59 +0000 (13:23 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79650: php-win.exe 100% cpu lockup

4 years agoFix #79650: php-win.exe 100% cpu lockup
Christoph M. Becker [Sun, 31 May 2020 11:28:09 +0000 (13:28 +0200)]
Fix #79650: php-win.exe 100% cpu lockup

As of PHP 7.3.0, `sapi_cli_single_write()` is supposed to return `< 0`
on failure, but `fwrite()` returns a `size_t`, and signals error by
setting the stream's error indicator.  We have to cater to that.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 28 May 2020 13:34:09 +0000 (15:34 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix PVS-Studio integration

4 years agoFix PVS-Studio integration
Christoph M. Becker [Thu, 28 May 2020 13:20:06 +0000 (15:20 +0200)]
Fix PVS-Studio integration

Without this configuration option, PVS-Studio looks for preprocessed
files (*.i), but these do not exists.

4 years agoUse automatic port assignment in socket_import/export test
Nikita Popov [Thu, 28 May 2020 08:18:01 +0000 (10:18 +0200)]
Use automatic port assignment in socket_import/export test

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Dmitry Stogov [Wed, 27 May 2020 08:26:25 +0000 (11:26 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed possible usage of uninitialized value

4 years agoFixed possible usage of uninitialized value
Dmitry Stogov [Wed, 27 May 2020 08:25:18 +0000 (11:25 +0300)]
Fixed possible usage of uninitialized value

4 years agoEnable phpdbg tests on AppVeyor
Christoph M. Becker [Mon, 25 May 2020 22:16:36 +0000 (00:16 +0200)]
Enable phpdbg tests on AppVeyor

4 years agoMake phpdbg test portable
Christoph M. Becker [Mon, 25 May 2020 22:13:54 +0000 (00:13 +0200)]
Make phpdbg test portable

4 years agoFix several mostly Windows related phpdbg bugs
Christoph M. Becker [Mon, 25 May 2020 17:12:24 +0000 (19:12 +0200)]
Fix several mostly Windows related phpdbg bugs

* Properly initialize PHPDBG_G(watch_tmp)

  Otherwise that may cause segfaults in ZTS builds.

* Deactivate potentially remaining watchpoints after REPL

  Otherwise the memory could still be protected, resulting in segfaults
  during shutdown.

* NULL zend_handlers_table after freeing

  As of commit 4130fe4[1], the `zend_handlers_table` is explicitly
  freed in the `zend_vm_dtor()`.  Since phpdbg (and maybe some other
  SAPIs) may restart the engine afterwards, we have to make sure that
  the table is also NULLed.

* Only set context option if there is a context

  In other words, we must not follow the null pointer.

* Cater to file handles without attached console

  File handles do not necessarily have an attached console (for
  instance, pipes do not), in which case `GetConsoleScreenBufferInfo()`
  fails.  In this case we set a default value (`40`) for lines like on
  other systems.

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

4 years agoFix #73926: phpdbg will not accept input on restart execution
Christoph M. Becker [Tue, 19 May 2020 12:45:47 +0000 (14:45 +0200)]
Fix #73926: phpdbg will not accept input on restart execution

We are more liberal, and accept Windows line endings (CRLF) as well.

4 years agoFix #79595: zend_init_fpu() alters FPU precision
Christoph M. Becker [Tue, 26 May 2020 06:57:31 +0000 (08:57 +0200)]
Fix #79595: zend_init_fpu() alters FPU precision

On startup, PHP deliberately changes the floating point control word to
enforce binary64 format for the calculations for best consistency
across platforms.  However, this is unnessary for x86_64 architectures,
because in this case SSE instructions are used by default, and there is
no good reason to pass `-mfpmath=i387` or such.

Therefore, we can skip the modification, which has the benefit that
system libraries are free to work in the mode of their liking.

4 years agoAdd (expected) release date, and new header for 7.4.8
Derick Rethans [Tue, 26 May 2020 13:20:06 +0000 (14:20 +0100)]
Add (expected) release date, and new header for 7.4.8

4 years agoThis bug fix was cherry picked into 7.4.6
Derick Rethans [Tue, 26 May 2020 13:18:19 +0000 (14:18 +0100)]
This bug fix was cherry picked into 7.4.6

4 years agoRespect typed references in catch assignment
Nikita Popov [Tue, 26 May 2020 12:59:40 +0000 (14:59 +0200)]
Respect typed references in catch assignment

I decided to null out EG(exception) early here, which means only
the exception from the dtor / ref assign is preserved, and the
previous exception is not chained in. This is more robust, and
I don't think this situation is common enough to be bothered about
the precise behavior.

4 years agoFix zend_assign_to_typed_ref() implementation
Nikita Popov [Tue, 26 May 2020 12:06:36 +0000 (14:06 +0200)]
Fix zend_assign_to_typed_ref() implementation

There was some confusion going on here regarding the original
value vs the copied value.

I've dropped the needs_copy variable, because this code is not
inlined, so it would always be true anyway.

What we need to do is perform a move-assignment of the copied
value (in which case we don't care about performing the assignment
before destroying garbage), and destroying the original value
for the VAR/TMP cases. This is a bit complicated by the fact that
references are passed in via a separate ref variable, so we can't
just ptr_dtor the original variable.

4 years agoFixed historical dates in NEWS
Derick Rethans [Tue, 26 May 2020 10:47:26 +0000 (11:47 +0100)]
Fixed historical dates in NEWS

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 26 May 2020 08:56:28 +0000 (10:56 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  7.3.20 will be next

4 years ago7.3.20 will be next
Christoph M. Becker [Tue, 26 May 2020 08:53:22 +0000 (10:53 +0200)]
7.3.20 will be next

4 years agoRevert "Fix #79595: zend_init_fpu() alters FPU precision"
Nikita Popov [Fri, 22 May 2020 14:57:14 +0000 (16:57 +0200)]
Revert "Fix #79595: zend_init_fpu() alters FPU precision"

This reverts commit 88dfc475c5937822399843e8aed9b98a36a01813.

4 years agoShow diffs for failed tests on Azure CI
Alex Dowad [Fri, 22 May 2020 12:09:20 +0000 (14:09 +0200)]
Show diffs for failed tests on Azure CI

It's currently not possible to view the "Tests" tab on Azure if
you're not signed in, so also display diffs in the log.

Closes GH-5612.

4 years agoFix #79595: zend_init_fpu() alters FPU precision
Christoph M. Becker [Wed, 20 May 2020 11:23:17 +0000 (13:23 +0200)]
Fix #79595: zend_init_fpu() alters FPU precision

On startup, PHP deliberately changes the floating point control word to
enforce binary64 format for the calculations for best consistency
across platforms.  However, this is unnessary when compiling under
`__SSE__`, because in this case the x87 instructions are not used.
Therefore, we can skip the modification, which has the benefit that
system libraries are free to work in the mode of their liking.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 22 May 2020 07:18:42 +0000 (09:18 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79615: Wrong GIF header written in GD GIFEncode

4 years agoFix #79615: Wrong GIF header written in GD GIFEncode
Christoph M. Becker [Fri, 22 May 2020 07:11:28 +0000 (09:11 +0200)]
Fix #79615: Wrong GIF header written in GD GIFEncode

The color resolution is expected in bits 4-6 of the packed fields byte
of the logical screen descriptor (byte 10 of the GIF data stream),
according to the specification[1], section 18.

[1] <https://www.w3.org/Graphics/GIF/spec-gif89a.txt>

4 years agoUpdate msan symbolizer path
Nikita Popov [Fri, 15 May 2020 08:21:59 +0000 (10:21 +0200)]
Update msan symbolizer path

To account for the newer version of LLVM on Ubuntu 18.04.

4 years agoFix bug #79603, by retrying on RTD key collision
Nikita Popov [Tue, 19 May 2020 08:13:25 +0000 (10:13 +0200)]
Fix bug #79603, by retrying on RTD key collision

This is a non-intrusive fix for 7.4, still trying to find a good
solution for master.

Closes GH-5597.

4 years agoFix static property indirections in file cache
Nikita Popov [Wed, 20 May 2020 08:55:36 +0000 (10:55 +0200)]
Fix static property indirections in file cache

If the class is already linked, we need to serialize and
unserialize INDIRECTed static properties. Normally these would
be set up when copying from cache.

4 years agoDon't require rc=1 for function static variables
Nikita Popov [Wed, 20 May 2020 08:26:08 +0000 (10:26 +0200)]
Don't require rc=1 for function static variables

If file cache only is used, then static_variables_ptr may point
to an immutable static_variables HT, which we do not want to
destroy here.

4 years agoBump version
Christoph M. Becker [Tue, 19 May 2020 15:24:18 +0000 (17:24 +0200)]
Bump version

Seems that has been forgotten.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 19 May 2020 14:00:19 +0000 (16:00 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix INI setting member name

4 years agoFix INI setting member name
Christoph M. Becker [Mon, 18 May 2020 14:07:16 +0000 (16:07 +0200)]
Fix INI setting member name

Since the member is not used in `OnUpdateEol()` that's not really an
issue, but still it's confusing to apparently have two INI settings
targeting the same member.

4 years agoPut Xdebug 3 into 'off' mode for run-tests.php
Derick Rethans [Mon, 18 May 2020 12:51:40 +0000 (13:51 +0100)]
Put Xdebug 3 into 'off' mode for run-tests.php

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Derick Rethans [Mon, 18 May 2020 12:51:14 +0000 (13:51 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

4 years agoPut Xdebug 3 into 'off' mode for run-tests.php
Derick Rethans [Mon, 18 May 2020 12:49:12 +0000 (13:49 +0100)]
Put Xdebug 3 into 'off' mode for run-tests.php

4 years agoFixed bug #79600
Nikita Popov [Fri, 15 May 2020 09:03:05 +0000 (11:03 +0200)]
Fixed bug #79600

Missed unsetting of DO_INIT in one case.

4 years agofixed typo of bug id (#79599)
Xinchen Hui [Fri, 15 May 2020 07:43:38 +0000 (15:43 +0800)]
fixed typo of bug id (#79599)

4 years agoMerge branch 'PHP-7.4' of git.php.net:/php-src into PHP-7.4
Xinchen Hui [Fri, 15 May 2020 07:36:51 +0000 (15:36 +0800)]
Merge branch 'PHP-7.4' of git.php.net:/php-src into PHP-7.4

* 'PHP-7.4' of git.php.net:/php-src:
  Fix #79557: extension_dir = ./ext now use current directory for base
  Fix #79596: MySQL FLOAT truncates to int some locales
  [ci skip] Fix NEWS

4 years agoFixed bug #97599 (coredump in set_error_handler)
Xinchen Hui [Fri, 15 May 2020 07:36:00 +0000 (15:36 +0800)]
Fixed bug #97599 (coredump in set_error_handler)

4 years agoFix #79557: extension_dir = ./ext now use current directory for base
Christoph M. Becker [Mon, 4 May 2020 12:55:24 +0000 (14:55 +0200)]
Fix #79557: extension_dir = ./ext now use current directory for base

For some reason, `ImageLoad()` fails to load images with a relative
path starting with `.\`  or `./`.  We work around this issue by
stripping those leading characters.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 15 May 2020 07:11:19 +0000 (09:11 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79596: MySQL FLOAT truncates to int some locales

4 years agoFix #79596: MySQL FLOAT truncates to int some locales
Christoph M. Becker [Fri, 15 May 2020 07:09:41 +0000 (09:09 +0200)]
Fix #79596: MySQL FLOAT truncates to int some locales

We must not do locale aware float to string conversion here; instead
we using our `snprintf()` implementation with the `F` specifier.

4 years ago[ci skip] Fix NEWS
Christoph M. Becker [Fri, 15 May 2020 06:53:58 +0000 (08:53 +0200)]
[ci skip] Fix NEWS

We add the missing release dates, the NEWS regarding the latest CVE
fixes, and move the entry for bug #79536 to 7.4.7 because it didn't
make it into 7.4.6.

4 years agoCheck compatibility with proper runtime DLL
Christoph M. Becker [Thu, 14 May 2020 13:39:00 +0000 (15:39 +0200)]
Check compatibility with proper runtime DLL

In practise, this likely does not matter, because usually these DLLs
are installed side by side, but still we should check the proper DLL.

4 years agoCanonicalize bison error during ini parsing
Nikita Popov [Thu, 14 May 2020 10:54:20 +0000 (12:54 +0200)]
Canonicalize bison error during ini parsing

Bison 3.6 seems to use "end of file" rather than "$end" for this.
Force the same on older bison versions to be consistent.

4 years agoFix lcov genhtml: ERROR: cannot read [file]
Gerard Roche [Wed, 13 May 2020 18:57:54 +0000 (19:57 +0100)]
Fix lcov genhtml: ERROR: cannot read [file]

lcov is emitting several errors for generated regex files that have no code
coverage data. The fix is to add the files to the lcov exlusion list.

This is not an issue for CI because it uses gcovr to generate code coverage.

The errors:

    Processing ext/date/lib/parse_date.gcda
    geninfo: WARNING: could not open /home/code/vendor/php/php-src/parse_date.re
    geninfo: WARNING: could not open /home/code/vendor/php/php-src/<stdout>
    geninfo: WARNING: some exclusion markers may be ignored
    Processing ext/date/lib/parse_tz.gcda
    Processing ext/date/lib/tm2unixtime.gcda
    Processing ext/date/lib/parse_iso_intervals.gcda
    geninfo: WARNING: could not open /home/code/vendor/php/php-src/<stdout>
    geninfo: WARNING: could not open /home/code/vendor/php/php-src/parse_iso_intervals.re
    geninfo: WARNING: some exclusion markers may be ignored
    ...
    genhtml: ERROR: cannot read /home/code/vendor/php/php-src/parse_date.re
    Processing file /home/code/vendor/php/php-src/parse_date.re
    make: *** [Makefile:443: lcov-html] Error 2

Closes GH-5568.

4 years agoProperly detect CRC32 APIs on aarch64 from configure
Ondřej Surý [Wed, 13 May 2020 06:22:29 +0000 (08:22 +0200)]
Properly detect CRC32 APIs on aarch64 from configure

The CRC32 APIs are optional for armv8-a. They became mandatory since
armv8.1-a.

Closes GH-5564.

4 years agoFix brittle shmop test
Christoph M. Becker [Wed, 13 May 2020 21:09:57 +0000 (23:09 +0200)]
Fix brittle shmop test

To solve bug #70886, the test uses random keys to prevent collisions;
however, this is not guaranteed, and as such it may even collide with
other tests in the shmop test suite.  The proper solution would be to
use a single key (which could be randomly generated), but to actually
`shmop_close()` after each `shmop_delete()`.  This would, however, not
work on Windows due to bug #65987.  Therefore we use three different
keys for now.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 12 May 2020 17:47:13 +0000 (19:47 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79588: Boolean opcache settings ignore on/off values

4 years agoFix #79588: Boolean opcache settings ignore on/off values
Christoph M. Becker [Tue, 12 May 2020 14:14:54 +0000 (16:14 +0200)]
Fix #79588: Boolean opcache settings ignore on/off values

We should display boolean INI settings as boolean.

4 years agoSkip test on big-endian architectures
Christoph M. Becker [Tue, 12 May 2020 11:31:53 +0000 (13:31 +0200)]
Skip test on big-endian architectures

Due to the memory layout on BE architectures, the address would be
`0x2a00000000` instead of `0x2a` on little-endian architectures.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 12 May 2020 09:48:11 +0000 (11:48 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79489: .user.ini does not inherit

4 years agoFix #79489: .user.ini does not inherit
Christoph M. Becker [Tue, 5 May 2020 08:36:16 +0000 (10:36 +0200)]
Fix #79489: .user.ini does not inherit

On Windows, PATH_TRANSLATED may contain backslashes as well as slashes,
so we must not only check for `DEFAULT_SLASH`.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 12 May 2020 09:17:33 +0000 (11:17 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  [ci skip] Update NEWS

4 years ago[ci skip] Update NEWS
Christoph M. Becker [Tue, 12 May 2020 09:16:55 +0000 (11:16 +0200)]
[ci skip] Update NEWS

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Remi Collet [Tue, 12 May 2020 07:19:36 +0000 (09:19 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  bump version to 7.2.32-dev
  Update NEWS

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Remi Collet [Tue, 12 May 2020 07:19:11 +0000 (09:19 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  bump version to 7.2.32-dev
  Update NEWS

4 years agobump version to 7.2.32-dev
Remi Collet [Tue, 12 May 2020 07:16:01 +0000 (09:16 +0200)]
bump version to 7.2.32-dev

4 years agoUpdate NEWS
Stanislav Malyshev [Mon, 11 May 2020 21:28:51 +0000 (14:28 -0700)]
Update NEWS

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Stanislav Malyshev [Mon, 11 May 2020 21:20:47 +0000 (14:20 -0700)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78876: Long variables cause OOM and temp files are not cleaned
  Fix #78875: Long filenames cause OOM and temp files are not cleaned
  Update NEWS for 7.2.31
  Update CREDITS for PHP 7.2.30
  Update NEWS for PHP 7.2.30

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Stanislav Malyshev [Mon, 11 May 2020 21:20:41 +0000 (14:20 -0700)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #78876: Long variables cause OOM and temp files are not cleaned
  Fix #78875: Long filenames cause OOM and temp files are not cleaned
  Update NEWS for 7.2.31
  Update CREDITS for PHP 7.2.30
  Update NEWS for PHP 7.2.30

4 years agoFix #78876: Long variables cause OOM and temp files are not cleaned
Christoph M. Becker [Wed, 18 Mar 2020 09:57:42 +0000 (10:57 +0100)]
Fix #78876: Long variables cause OOM and temp files are not cleaned

We use the proper type for size calculations, which is `size_t`.

4 years agoFix #78875: Long filenames cause OOM and temp files are not cleaned
Christoph M. Becker [Wed, 18 Mar 2020 09:26:53 +0000 (10:26 +0100)]
Fix #78875: Long filenames cause OOM and temp files are not cleaned

We must not cast `size_t` to `int` (unless the `size_t` value is
guaranteed to be less than or equal to `INT_MAX`).  In this case we can
declare `array_len` as `size_t` in the first place.

4 years agoFix #79571: FFI: var_dumping unions may segfault
Christoph M. Becker [Mon, 11 May 2020 12:35:27 +0000 (14:35 +0200)]
Fix #79571: FFI: var_dumping unions may segfault

We must not attempt to access arbitrary union members when retrieving
debug info, because that may not be valid.  Therefore we do no longer
dereference pointer types inside of unions, but report their address as
string in `%p` format instead.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 11 May 2020 08:46:00 +0000 (10:46 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix default sendmail path when not found during build

4 years agoFix default sendmail path when not found during build
Indrek Ardel [Sat, 9 May 2020 00:08:14 +0000 (03:08 +0300)]
Fix default sendmail path when not found during build

Closes GH-5548.

4 years agoDon't check directory atime in lstat_stat_variation10.phpt test
Alex Dowad [Sun, 10 May 2020 12:57:12 +0000 (14:57 +0200)]
Don't check directory atime in lstat_stat_variation10.phpt test

This is a funny one. I discovered that lstat_stat_variation10.phpt was failing every
now and again when the PHP test suite was run on my dev PC. The output from the failing
test showed that the atime (access time) of the directory created in the test was changing
between these lines:

    $old_stat = stat($dirname);
    clearstatcache();
    sleep(1);
    var_dump( is_dir($dirname) );
    $new_stat = stat($dirname);

Could is_dir() be accessing the directory and changing the atime? strace showed that is_dir
was only issuing a single stat() syscall. Could stat() change the atime? No, no, that would
just be perverse. Nobody would be stupid enough to implement the kernel in that way.

Checked the kernel source, found that the function called when atime needs to be updated
appears to be touch_atime(). Broke out the BCC kernel tracing tools and ran this one
while running the flaky test case in a loop:

    sudo trace -I<kernel src dir>/include/linux/path.h -I<same>/include/linux/dcache.h 'touch_atime(struct path *path) "%s", path->dentry->d_name.name'

Inspecting the results showed that something called "git_thread" was occcasionally updating
the atime on the directory in question!! What on earth...???

The PID shown by trace revealed that this was a background thread for Sublime Text 3.
Sublime now has git integration and shows when there are untracked or modified files. It
seems that it uses a background thread to regularly scan the project directory and look
for new and modified files. This was causing the atime to change.

Even though other developers may not be running ST3, there are any number of reasons why
a background process might recurse through various directories and could cause the atime
to change unexpectedly. Therefore, update the test case so it doesn't fail in such cases.

Closes GH-5553.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 5 May 2020 09:39:38 +0000 (11:39 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79566: Private SHM is not private on Windows

4 years agoFix #79566: Private SHM is not private on Windows
Christoph M. Becker [Tue, 5 May 2020 07:31:17 +0000 (09:31 +0200)]
Fix #79566: Private SHM is not private on Windows

We map the POSIX semantics of `IPC_PRIVATE` by creating unnamed file
mapping objects on Windows.  While that is not particularly useful for
ext/shmop, which is the only bundled extension which uses `shmget()`,
it may be useful for external extensions.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 4 May 2020 21:00:27 +0000 (23:00 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79561: dns_get_record() fails with DNS_ALL

4 years agoFix #79561: dns_get_record() fails with DNS_ALL
Christoph M. Becker [Mon, 4 May 2020 14:51:51 +0000 (16:51 +0200)]
Fix #79561: dns_get_record() fails with DNS_ALL

Since Windows has its own definitions of the `PHP_DNS_*` macros, we
have to use these when registering the PHP constants.

4 years agoFixed bug #79548
Nikita Popov [Mon, 4 May 2020 14:27:45 +0000 (16:27 +0200)]
Fixed bug #79548

When duplicating user functions with static variables, make sure
that we init a new map ptr slot for the static variables.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 4 May 2020 12:52:18 +0000 (14:52 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79535

4 years agoFixed bug #79535
Nikita Popov [Mon, 4 May 2020 12:50:31 +0000 (14:50 +0200)]
Fixed bug #79535

We did not allocate a cache slot for FETCH_CLASS. This is already
fixed on newer PHP versions.

4 years agoFix i386 build on Azure
Nikita Popov [Mon, 4 May 2020 10:16:45 +0000 (12:16 +0200)]
Fix i386 build on Azure

Disabling postgresql entirely for now, because I can't figure out
how to fix it. Something broke big time with i386 packages on
Azure pipelines.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 4 May 2020 09:50:50 +0000 (11:50 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Add basic sapi_windows_cp_conv() test

4 years agoAdd basic sapi_windows_cp_conv() test
Christoph M. Becker [Mon, 4 May 2020 09:46:54 +0000 (11:46 +0200)]
Add basic sapi_windows_cp_conv() test

This function is lacking any tests so far.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 1 May 2020 10:38:03 +0000 (12:38 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79528: Different object of the same xml between 7.4.5 and 7.4.4

4 years agoFix #79528: Different object of the same xml between 7.4.5 and 7.4.4
Christoph M. Becker [Fri, 1 May 2020 10:19:32 +0000 (12:19 +0200)]
Fix #79528: Different object of the same xml between 7.4.5 and 7.4.4

Revert "Fix #61597: SXE properties may lack attributes and content"

This reverts commit 7c081db885756d7b176a55b90b8746f664d1e042.

4 years agoReduce test parallelism on ARM64 CI
Nikita Popov [Tue, 21 Apr 2020 10:03:49 +0000 (12:03 +0200)]
Reduce test parallelism on ARM64 CI

Let's go from 32 to 16 parallel jobs. We can reduce this further
if necessary.

Closes GH-5426.

4 years agoPass worker ID to clean scripts
Christoph M. Becker [Wed, 29 Apr 2020 09:12:03 +0000 (11:12 +0200)]
Pass worker ID to clean scripts

On Windows, reusing/sharing of OPcache instances with different
configuration is not necessarily supported, so we have to make that it
does not happen for the clean scripts, by using `$orig_ini_settings`
instead of `$clean_params`.

4 years agoMerge branch 'PHP-7.4' of git.php.net:/php-src into PHP-7.4
Xinchen Hui [Wed, 29 Apr 2020 10:58:48 +0000 (18:58 +0800)]
Merge branch 'PHP-7.4' of git.php.net:/php-src into PHP-7.4

* 'PHP-7.4' of git.php.net:/php-src:
  Fix #79532: sizeof off_t can be wrong
  Make 045.phpt busy wait
  Revert "Fix #79065: DOM classes do not expose properties to Reflection"
  Bump version
  Fix #79065: DOM classes do not expose properties to Reflection
  Fix #79470: PHP incompatible with 3rd party file system on demand