]> granicus.if.org Git - php/log
php
5 years agoRevert "Microoptimization (avoid code duplication)"
Dmitry Stogov [Thu, 5 Sep 2019 12:35:19 +0000 (15:35 +0300)]
Revert "Microoptimization (avoid code duplication)"

This reverts commit 25d97f5eeeaf2eca760139f04fe2711e71791d0f.

5 years agoMicrooptimization (avoid code duplication)
Dmitry Stogov [Thu, 5 Sep 2019 10:44:46 +0000 (13:44 +0300)]
Microoptimization (avoid code duplication)

5 years agoRemove HOT attribute from some VM handlers. Comparisons almost always followed by...
Dmitry Stogov [Thu, 5 Sep 2019 08:40:15 +0000 (11:40 +0300)]
Remove HOT attribute from some VM handlers. Comparisons almost always followed by JMPZ/JMPNZ; JMPZNZ is rare used.

5 years agoRemove --with-zlib-dir option from mysqlnd config
Nikita Popov [Thu, 5 Sep 2019 08:39:04 +0000 (10:39 +0200)]
Remove --with-zlib-dir option from mysqlnd config

mysqlnd doesn't actually use this. PDO MySQL uses it, but also
declares it separately.

5 years agoImprove exception handling for abstract/deprecated calls
Nikita Popov [Wed, 4 Sep 2019 12:43:42 +0000 (14:43 +0200)]
Improve exception handling for abstract/deprecated calls

Reuse existing arg freeing loop instead of duplicating it.

Additionally also handle deprecated in DO_FCALL_BY_NAME.

5 years agoFix handling of abstract/deprecated exception
Nikita Popov [Wed, 4 Sep 2019 10:34:20 +0000 (12:34 +0200)]
Fix handling of abstract/deprecated exception

The exception mechanism assumes that exceptions from DO_FCALL are
already happening after the function call. This means that we are
currently leaking the passed arguments, and I think we can also
corrupt the VM stack due to incorrect frame linking in some cases
(there are assertion failures if the VM stack page size is reduced).

Instead handle the stack frame freeing manually for this special
case.

5 years agoFixed bug #78488 (OOB in ZEND_FUNCTION(ffi_trampoline)).
Dmitry Stogov [Wed, 4 Sep 2019 09:13:49 +0000 (12:13 +0300)]
Fixed bug #78488 (OOB in ZEND_FUNCTION(ffi_trampoline)).

5 years agoAdd missing opcache return types for functions in spl
Tyson Andre [Tue, 3 Sep 2019 02:33:30 +0000 (22:33 -0400)]
Add missing opcache return types for functions in spl

(excluding spl_autoload)

spl_object_id() is of the most interest to me,
since I frequently call it in an application.

This includes false/null types caused by wrong argument types and wrong argument
counts.

I can't rule out iterator_to_array returning null in spl_iterator_apply,
so leave MAY_BE_NULL in.

With review comments by nikic:
Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com>
5 years agoAdd the last missing SKIPIF
Fabien Villepinte [Tue, 3 Sep 2019 20:54:41 +0000 (22:54 +0200)]
Add the last missing SKIPIF

5 years agoAdd missing SKIPIF (mbstring)
Fabien Villepinte [Tue, 3 Sep 2019 20:21:01 +0000 (22:21 +0200)]
Add missing SKIPIF (mbstring)

5 years agoAdd missing SKIPIF (openssl)
Fabien Villepinte [Tue, 3 Sep 2019 20:05:29 +0000 (22:05 +0200)]
Add missing SKIPIF (openssl)

Co-Authored-By: Gabriel Caruso <carusogabriel34@gmail.com>
5 years agoAdd missing SKIPIF (sqlite)
Fabien Villepinte [Tue, 3 Sep 2019 19:07:12 +0000 (21:07 +0200)]
Add missing SKIPIF (sqlite)

5 years agoAdd missing SKIPIF
Fabien Villepinte [Tue, 3 Sep 2019 18:57:39 +0000 (20:57 +0200)]
Add missing SKIPIF

5 years agoDocument opcache.preload_user directive
Christoph M. Becker [Tue, 3 Sep 2019 12:06:56 +0000 (14:06 +0200)]
Document opcache.preload_user directive

5 years agoReport false for inherited private methods in method_exists()
Nikita Popov [Tue, 3 Sep 2019 11:14:33 +0000 (13:14 +0200)]
Report false for inherited private methods in method_exists()

These shadow methods only exist as internal implementation markers.
This mirrors the behavior of property_exists().

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 3 Sep 2019 11:32:40 +0000 (13:32 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #41997: SP call yields additional empty result set

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Tue, 3 Sep 2019 11:30:05 +0000 (13:30 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #41997: SP call yields additional empty result set

5 years agoFix #41997: SP call yields additional empty result set
Christoph M. Becker [Tue, 6 Aug 2019 12:30:41 +0000 (14:30 +0200)]
Fix #41997: SP call yields additional empty result set

When stored procedures are called, the "final result set is a status
result that includes no result set".  Calling `::nextRowset()` on the
actual last result set should return FALSE, since there is actually no
further result set to be processed.

5 years agoExecute preload script under user defined by opcache.preload_user directive
Dmitry Stogov [Tue, 3 Sep 2019 11:23:13 +0000 (14:23 +0300)]
Execute preload script under user defined by opcache.preload_user directive

5 years agoAvoid pointer UB in strip_header
Nikita Popov [Tue, 3 Sep 2019 10:01:56 +0000 (12:01 +0200)]
Avoid pointer UB in strip_header

Don't calculate header_start if lc_header_start is NULL, as we're
going to overflow the address space in that case.

5 years agoUse unsigned subtraction in php_random_int()
Nikita Popov [Tue, 3 Sep 2019 09:05:47 +0000 (11:05 +0200)]
Use unsigned subtraction in php_random_int()

This subtraction may overflow the signed domain, which is UB. Use
an unsigned subtraction instead.

5 years agoMerge branch 'PHP-7.4' of git://github.com/php/php-src into PHP-7.4
Derick Rethans [Tue, 3 Sep 2019 08:11:00 +0000 (09:11 +0100)]
Merge branch 'PHP-7.4' of git://github.com/php/php-src into PHP-7.4

5 years agoAdd missing opcache return info for ext/standard.
Tyson Andre [Tue, 3 Sep 2019 02:14:11 +0000 (22:14 -0400)]
Add missing opcache return info for ext/standard.

array_key_first/last returns null for invalid args,
wrong argument counts, and empty arrays.

random_bytes returns a string or throws.

5 years agoAdd new missing functions from ext/hash
Tyson Andre [Tue, 3 Sep 2019 02:14:11 +0000 (22:14 -0400)]
Add new missing functions from ext/hash

5 years agoAdd zpp check to spl_classes()
Nikita Popov [Tue, 3 Sep 2019 07:50:08 +0000 (09:50 +0200)]
Add zpp check to spl_classes()

5 years agoUpdate NEWS for 7.4.0RC2
Derick Rethans [Tue, 3 Sep 2019 07:46:16 +0000 (07:46 +0000)]
Update NEWS for 7.4.0RC2

5 years agoUpdate NEWS for PHP 7.4.0RC1
Derick Rethans [Tue, 3 Sep 2019 07:44:58 +0000 (07:44 +0000)]
Update NEWS for PHP 7.4.0RC1

5 years agoClarify failure behavior of spl_iterator_apply()
Nikita Popov [Tue, 3 Sep 2019 07:43:22 +0000 (09:43 +0200)]
Clarify failure behavior of spl_iterator_apply()

It only fails if it throws, in which case it is meaningless to
set a return value.

5 years agoAdd missing argument checks
Christoph M. Becker [Tue, 3 Sep 2019 07:25:21 +0000 (09:25 +0200)]
Add missing argument checks

These functions don't expect any arguments, so we check that none are
given.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 3 Sep 2019 07:24:05 +0000 (09:24 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Tue, 3 Sep 2019 07:23:55 +0000 (09:23 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFix opcache return type for hash_update_stream
Tyson Andre [Tue, 3 Sep 2019 01:32:24 +0000 (21:32 -0400)]
Fix opcache return type for hash_update_stream

It can return false if the resource type is wrong.

```
php > var_export(hash_update_stream(hash_init('md5'),
        imagecreate(1,1)));

Warning: hash_update_stream(): supplied resource is not a valid stream
resource in php shell code on line 1
false
```

The return types were initially added in
c88ffa9a5673cb3141660626ba1921671f0b84d6

5 years agoUpdate PHP_API_VERSION
Dmitry Stogov [Mon, 2 Sep 2019 16:02:40 +0000 (19:02 +0300)]
Update PHP_API_VERSION

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 2 Sep 2019 13:21:49 +0000 (15:21 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Update NEWS

5 years agoUpdate NEWS
Christoph M. Becker [Mon, 2 Sep 2019 13:21:20 +0000 (15:21 +0200)]
Update NEWS

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 2 Sep 2019 13:06:45 +0000 (15:06 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #76577: outdated documentation concerning track_errors

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Mon, 2 Sep 2019 13:05:57 +0000 (15:05 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #76577: outdated documentation concerning track_errors

5 years agoFix #76577: outdated documentation concerning track_errors
Christoph M. Becker [Mon, 2 Sep 2019 13:05:01 +0000 (15:05 +0200)]
Fix #76577: outdated documentation concerning track_errors

5 years agoFree two bits in fn_flags by merging ZEND_ACC_HEAP_RT_CACHE/ZEND_ACC_USER_ARG_INFO...
Dmitry Stogov [Mon, 2 Sep 2019 11:05:28 +0000 (14:05 +0300)]
Free two bits in fn_flags by merging ZEND_ACC_HEAP_RT_CACHE/ZEND_ACC_USER_ARG_INFO and ZEND_ACC_DONE_PASS_TWO/ZEND_ACC_ARENA_ALLOCATED that may be used only for user/internal functions

5 years agoFixed information about unused flags
Dmitry Stogov [Mon, 2 Sep 2019 09:50:05 +0000 (12:50 +0300)]
Fixed information about unused flags

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 2 Sep 2019 07:37:26 +0000 (09:37 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Mon, 2 Sep 2019 07:36:58 +0000 (09:36 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFix pkg-config version constraint for ICU
Nikita Popov [Mon, 2 Sep 2019 07:36:20 +0000 (09:36 +0200)]
Fix pkg-config version constraint for ICU

On PHP 7.2 our minimum ICU version is 4.0, not 40.

5 years agoDrop E_STRICT notice in mysqli extension
George Peter Banyard [Sun, 14 Jul 2019 19:31:21 +0000 (21:31 +0200)]
Drop E_STRICT notice in mysqli extension

5 years agoReenable alloca support on ZTS
Nikita Popov [Fri, 30 Aug 2019 15:24:06 +0000 (17:24 +0200)]
Reenable alloca support on ZTS

This got disabled due to an incorrect change in a preprocessor condition
in 2104bea5d756dfa40b605a4a2765a3bc4637a76c. It was not supposed to
be disabled.

5 years agoFix file clashes in copy tests
Nikita Popov [Fri, 30 Aug 2019 14:36:49 +0000 (16:36 +0200)]
Fix file clashes in copy tests

Create the "*" file in a sub-directory rather than the main test
directory, so that it's different for each test.

5 years agoRemove bogus vcwd_open
Nikita Popov [Fri, 30 Aug 2019 13:25:23 +0000 (15:25 +0200)]
Remove bogus vcwd_open

This is a left-over from the Linux version...

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 30 Aug 2019 14:07:54 +0000 (16:07 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Fri, 30 Aug 2019 14:07:33 +0000 (16:07 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFixed bug #78469
Sergei Turchanov [Wed, 28 Aug 2019 03:05:14 +0000 (13:05 +1000)]
Fixed bug #78469

fcgi_accept_request function is supposed to call a FastCGI implementation's
on_accept hook when entering an "accepting" stage (that is right before
calling "accept"). This hook implementation (fpm_request_accepting) updates
a worker state to an "accepting" state which is effectively an "Idle" state,
and updates counters on the scoreboard of the corresponding pool (idle++,
active--).

But this is not done when listening for client connections on a named pipe on
Windows platform. In that case a combination of
ConnectNamedPipe/WaitForSingleObject is used (to be able to catch in_shutdown
as far as I understand), but it is nonetheless functionally equivalent to
"accept" call. Also by not calling on_hook neither a worker's state is updated
to "accepting" state nor scoreboard counters are updated.

5 years agoAvoid accessing undefined index in CLI server test
Nikita Popov [Fri, 30 Aug 2019 09:01:32 +0000 (11:01 +0200)]
Avoid accessing undefined index in CLI server test

5 years agoDon't call Reflection::export() in --rf etc implementation
Nikita Popov [Fri, 30 Aug 2019 08:59:58 +0000 (10:59 +0200)]
Don't call Reflection::export() in --rf etc implementation

This method is deprecated ... instead simply directly print the
object.

5 years agoModernize some connectors in tests to remove env key duplication
Fabien Villepinte [Tue, 27 Aug 2019 10:50:26 +0000 (12:50 +0200)]
Modernize some connectors in tests to remove env key duplication

5 years agoAdd job for community projects
Nikita Popov [Tue, 27 Aug 2019 18:54:50 +0000 (20:54 +0200)]
Add job for community projects

Run some open-source projects through an aggressive debug
configuration with asan and ubsan. We don't care about test results,
only check that we don't assert or crash.

Currently testing laravel, symfony and amp.

5 years agoUpdate NEWS
Peter Kokot [Fri, 30 Aug 2019 02:32:05 +0000 (04:32 +0200)]
Update NEWS

5 years agoFix #78460: PEAR installation failure
Peter Kokot [Wed, 28 Aug 2019 15:21:46 +0000 (17:21 +0200)]
Fix #78460: PEAR installation failure

When building PHP outside of the source tree:

  mkdir custom-build-dir
  cd custom-build-dir
  ../path/to/php-src/configure

The directories need to be manually created including the pear directory
so the pear installation PHAR file doesn't need to be downloaded from
the remote location.

Closes GH-4639

5 years agoFix potentially uninitialized use in ldap
Nikita Popov [Thu, 29 Aug 2019 16:01:34 +0000 (18:01 +0200)]
Fix potentially uninitialized use in ldap

If ctrl->ldctl_value.bv_len is zero context is uninitialized. Only
free it if the call took place and succeeded.

5 years agoAddref static vars when not copying private method
Nikita Popov [Thu, 29 Aug 2019 12:33:31 +0000 (14:33 +0200)]
Addref static vars when not copying private method

While we don't need to give this method separate static vars, we
do still need to perform an addref, as there will be a corresponding
delref in the dtor.

5 years agoUse explicit unaligned type in md5 implementation
Nikita Popov [Thu, 29 Aug 2019 10:58:22 +0000 (12:58 +0200)]
Use explicit unaligned type in md5 implementation

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 29 Aug 2019 10:34:07 +0000 (12:34 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Thu, 29 Aug 2019 10:32:23 +0000 (12:32 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFix use-after-free of immediately invoked closure with extra args
Nikita Popov [Thu, 29 Aug 2019 10:30:39 +0000 (12:30 +0200)]
Fix use-after-free of immediately invoked closure with extra args

5 years agoSet opcache.protect_memory=1 on Azure
Nikita Popov [Wed, 28 Aug 2019 15:39:39 +0000 (17:39 +0200)]
Set opcache.protect_memory=1 on Azure

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 28 Aug 2019 15:58:13 +0000 (17:58 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78473: odbc_close() closes arbitrary resources

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Wed, 28 Aug 2019 15:56:23 +0000 (17:56 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #78473: odbc_close() closes arbitrary resources

5 years agoFix #78473: odbc_close() closes arbitrary resources
Christoph M. Becker [Wed, 28 Aug 2019 15:51:57 +0000 (17:51 +0200)]
Fix #78473: odbc_close() closes arbitrary resources

We have to bail out, if an invalid resource is given.  For consistency
with the other `zend_fetch_resource(2)` calls, we return `FALSE`.

5 years agoAdd missed mutability check
Nikita Popov [Wed, 28 Aug 2019 15:31:52 +0000 (17:31 +0200)]
Add missed mutability check

5 years agoRemove delref in free_object_storage
Nikita Popov [Wed, 28 Aug 2019 13:35:53 +0000 (15:35 +0200)]
Remove delref in free_object_storage

This gives us better object leak diagnostics.

5 years agoDestroy error handlers before final GC run
Nikita Popov [Wed, 28 Aug 2019 13:33:51 +0000 (15:33 +0200)]
Destroy error handlers before final GC run

5 years agoFixed bug #78335
Nikita Popov [Wed, 28 Aug 2019 10:15:28 +0000 (12:15 +0200)]
Fixed bug #78335

Destroy static properties and variables prior to the final GC run,
as they may hold GC roots.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Stanislav Malyshev [Wed, 28 Aug 2019 07:11:50 +0000 (00:11 -0700)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Upgrade oniguruma lib to 6.9.3

5 years agoUpgrade oniguruma lib to 6.9.3
Stanislav Malyshev [Wed, 28 Aug 2019 06:28:33 +0000 (23:28 -0700)]
Upgrade oniguruma lib to 6.9.3

5 years agoDon't specify precedence for T_INC/T_DEC
Nikita Popov [Tue, 27 Aug 2019 19:59:56 +0000 (21:59 +0200)]
Don't specify precedence for T_INC/T_DEC

As these do not operate on expressions, precedence is meaningless
for them.

5 years agoAdd --with-pear to Travis build
Nikita Popov [Tue, 27 Aug 2019 09:36:58 +0000 (11:36 +0200)]
Add --with-pear to Travis build

5 years agoadd ffi to php.ini extension [ci skip]
Pavel Dyakonov [Tue, 27 Aug 2019 13:06:56 +0000 (16:06 +0300)]
add ffi to php.ini extension [ci skip]

5 years agoFix signature and calls
Anatol Belski [Tue, 27 Aug 2019 12:34:14 +0000 (14:34 +0200)]
Fix signature and calls

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 27 Aug 2019 11:36:09 +0000 (13:36 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Update SDK version for AppVeyor

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Tue, 27 Aug 2019 11:35:05 +0000 (13:35 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Update SDK version for AppVeyor

5 years agoUpdate SDK version for AppVeyor
Christoph M. Becker [Tue, 27 Aug 2019 11:34:35 +0000 (13:34 +0200)]
Update SDK version for AppVeyor

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Jakub Zelenka [Mon, 26 Aug 2019 17:11:04 +0000 (18:11 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoFix bug #78334 (fpm log prefix message includes wrong stdout/stderr notation)
Tsuyoshi Sadakata [Thu, 25 Jul 2019 14:22:45 +0000 (23:22 +0900)]
Fix bug #78334 (fpm log prefix message includes wrong stdout/stderr notation)

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 26 Aug 2019 15:52:56 +0000 (17:52 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Mon, 26 Aug 2019 15:50:46 +0000 (17:50 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoRemove properties HT from nested GC data
Nikita Popov [Mon, 26 Aug 2019 15:48:05 +0000 (17:48 +0200)]
Remove properties HT from nested GC data

The properties HT may be a GC root itself, so we need to remove it.
I'm not sure this issue actually applies to PHP 7.2, but committing
it there to be safe. As seen from the test case, the handling here
is rather buggy on 7.2.

5 years agoDon't use needs_live_range hook for "special" live ranges
Nikita Popov [Mon, 26 Aug 2019 14:10:29 +0000 (16:10 +0200)]
Don't use needs_live_range hook for "special" live ranges

In particular we were disgarding SILENCE live ranges in opcache,
because we decided that a MAY_BE_LONG type does not need a live
range.

5 years agoReplace deprecated libzip functions
Christoph M. Becker [Mon, 26 Aug 2019 10:37:29 +0000 (12:37 +0200)]
Replace deprecated libzip functions

We replace all deprecated libzip functions with their recommended
substitutes, and add proper comment length checks including a test
case.

5 years agoDeprecate AI_IDN_ALLOW_UNASSIGNED and AI_IDN_USE_STD3_ASCII_RULES
viest [Sat, 3 Aug 2019 15:05:56 +0000 (23:05 +0800)]
Deprecate AI_IDN_ALLOW_UNASSIGNED and AI_IDN_USE_STD3_ASCII_RULES

These flags have been deprecated in glibc 2.28, so we also
deprecate them in PHP.

As we can't deprecate constants, we can only check for their use
in socket_addrinfo_lookup().

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 26 Aug 2019 09:13:57 +0000 (11:13 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Mon, 26 Aug 2019 09:13:49 +0000 (11:13 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoAlso fix signature for passthru
Tyson Andre [Sun, 25 Aug 2019 15:02:28 +0000 (11:02 -0400)]
Also fix signature for passthru

Backported from a1a8d144854acb1c891cf0c21abb0f612b1d8de7
https://www.php.net/manual/en/function.passthru.php#refsect1-function.passthru-returnvalues

`passthru()` is false with invalid args
`passthru('command')` is null.

5 years agoFix opcache optimizer info for time_nanosleep
Tyson Andre [Sun, 25 Aug 2019 14:48:52 +0000 (10:48 -0400)]
Fix opcache optimizer info for time_nanosleep

This can also return an array. See
https://www.php.net/manual/en/function.time-nanosleep.php#refsect1-function.time-nanosleep-returnvalues

> If the delay was interrupted by a signal, an associative array will be
returned with the components:
>
> - seconds - number of seconds remaining in the delay
> - nanoseconds - number of nanoseconds remaining in the delay

Sending a SIGUSR1 to the below program would trigger this behavior.

```
pcntl_signal(\SIGUSR1, function ($signo, $signinfo) {
    echo "Handling a signal $signo\n";
});
echo "Sleeping for 100 seconds\n";
var_export(time_nanosleep(100, 0));
```

The incomplete signature existed since c88ffa9a5.
No phpt tests existed for time_nanosleep returning an array

5 years agoFixed bug #78456
Nikita Popov [Mon, 26 Aug 2019 09:08:42 +0000 (11:08 +0200)]
Fixed bug #78456

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 26 Aug 2019 08:27:08 +0000 (10:27 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Mon, 26 Aug 2019 08:26:49 +0000 (10:26 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFix overflow in memory limit checks
Nikita Popov [Mon, 26 Aug 2019 08:23:23 +0000 (10:23 +0200)]
Fix overflow in memory limit checks

Due to overflows in the memory limit checks, we were missing cases
where the allocation size was close to the address space size, and
caused an OOM condition rather than a memory limit error.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Stanislav Malyshev [Mon, 26 Aug 2019 03:06:43 +0000 (20:06 -0700)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix test

5 years agoFix test
Stanislav Malyshev [Mon, 26 Aug 2019 03:06:02 +0000 (20:06 -0700)]
Fix test

Not sure why offset changed... probably different PCRE version calculates
them in different way.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Stanislav Malyshev [Mon, 26 Aug 2019 02:21:08 +0000 (19:21 -0700)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #75457: heap-use-after-free in php7.0.25

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Stanislav Malyshev [Mon, 26 Aug 2019 02:21:04 +0000 (19:21 -0700)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #75457: heap-use-after-free in php7.0.25

5 years agoMerge branch 'PHP-7.1' into PHP-7.2
Stanislav Malyshev [Mon, 26 Aug 2019 02:20:59 +0000 (19:20 -0700)]
Merge branch 'PHP-7.1' into PHP-7.2

* PHP-7.1:
  Fix #75457: heap-use-after-free in php7.0.25