Skip to content

sync master #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Oct 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
773f980
Backport of a partial fix for bug Bug #76982 (memory leak declaring c…
dstogov Oct 1, 2020
59f497a
Merge branch 'PHP-7.3' into PHP-7.4
dstogov Oct 1, 2020
4f261a0
Merge branch 'PHP-7.4'
dstogov Oct 1, 2020
0a84fba
Improve parameter names in ext/xmlwriter
Sep 24, 2020
afab9eb
Fix bug #65387
nikic Oct 1, 2020
2c1b5c4
Support GC for AppendIterator
nikic Oct 1, 2020
7af24ea
Allow empty needle in grapheme_str*pos, grapheme_str*str
Sep 30, 2020
f82414e
Fix out of bounds offset handling with empty needle
nikic Oct 1, 2020
d96219c
Fixed bug #80121
nikic Oct 1, 2020
62c6d69
Add test instantiating all objects
nikic Oct 1, 2020
29dd124
Clenup BINARY_OP + SEND_VAL optimization
dstogov Oct 1, 2020
ceef8ad
Review parameter names in ext/sysvmsg
kocsismate Oct 1, 2020
85949d7
Review parameter names in ext/sysvsem
kocsismate Oct 1, 2020
4a30c76
Review parameter names in ext/sysvshm
kocsismate Oct 1, 2020
1666cfc
[ci skip] moved soap fix to 7.3.23
mbeccati Oct 2, 2020
233b66c
Merge branch 'PHP-7.3' into PHP-7.4
mbeccati Oct 2, 2020
7c48479
[ci skip] moved soap fix to 7.4.11
mbeccati Oct 2, 2020
902f634
Merge branch 'PHP-7.4'
mbeccati Oct 2, 2020
d7243ce
Add UPGRADING note for substr() behavior
nikic Oct 2, 2020
fbf153a
Fixed possible incorrect register usage
dstogov Oct 2, 2020
b0e7706
Fixed JIT for BINARY_OP with expected overflow
dstogov Oct 2, 2020
109fb3e
Copy optimization for (BINARY_OP/ACCIGN + SEND_VAL)
dstogov Oct 2, 2020
6b00196
Review parameter names in ext/pcre
kocsismate Oct 1, 2020
811f6dd
Review parameter names in ext/enchant
kocsismate Oct 1, 2020
4f42519
Review parameter names in ext/exif
kocsismate Oct 1, 2020
ae77c7b
Return correct result code for division by zero
nikic Oct 2, 2020
c9c7820
Review parameter names in ext/ftp
kocsismate Oct 1, 2020
bf6873a
Fix out-of-bounds write
kkos Sep 21, 2020
c00816a
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Oct 2, 2020
c137f4b
Merge branch 'PHP-7.4' into master
cmb69 Oct 2, 2020
2e32a09
Add gen_stub --legacy flag
nikic Oct 2, 2020
924ac2b
Add partial namespace support to gen_stub
nikic Oct 2, 2020
dfa6d1c
Support specifying linkage for generate-function-entries
nikic Oct 2, 2020
e0b17ba
Use a subrountine to check for valid OID strings
Girgias Oct 1, 2020
2d234d1
Declare FFI\CType in namespace
nikic Oct 2, 2020
54435c9
Fix #64060: lstat_stat_variation7.phpt fails on certain file systems
cmb69 Sep 23, 2020
1079622
add note about is_callable change
remicollet Oct 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.0.0rc2

- Curl:
. Fixed bug #80121 (Null pointer deref if CurlHandle directly instantiated).
(Nikita)

- SPL:
. Fixed bug #65387 (Circular references in SPL iterators are not garbage
collected). (Nikita)

- Standard:
. Fixed bug #64060 (lstat_stat_variation7.phpt fails on certain file systems).
(M. Voelker, cmb)

01 Oct 2020, PHP 8.0.0rc1

Expand Down
5 changes: 5 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ PHP 8.0 UPGRADE NOTES
. Methods with the same name as the class are no longer interpreted as
constructors. The __construct() method should be used instead.
. Removed ability to call non-static methods statically.
Thus `is_callable` will fail when checking for a non-static method with a
classname (must check with an object instance).
. Removed (unset) cast.
. Removed track_errors ini directive. This means that $php_errormsg is no
longer available. The error_get_last() function may be used instead.
Expand Down Expand Up @@ -608,6 +610,9 @@ PHP 8.0 UPGRADE NOTES
. Calling crypt() without an explicit salt is no longer supported. If you
would like to produce a strong hash with an auto-generated salt, use
password_hash() instead.
. substr(), mb_substr(), iconv_substr() and grapheme_substr() now consistently
clamp out-of-bounds offsets to the string boundary. Previously, false was
returned instead of the empty string in some cases.

- Sysvmsg:
. msg_get_queue() will now return an SysvMessageQueue object rather than a
Expand Down
11 changes: 11 additions & 0 deletions Zend/tests/div_by_zero_in_static.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--TEST--
Division by zero in static
--FILE--
<?php
static $a = 1/0;
?>
--EXPECTF--
Fatal error: Uncaught DivisionByZeroError: Division by zero in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
15 changes: 15 additions & 0 deletions Zend/tests/instantiate_all_classes.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--TEST--
Try to instantiate all classes without arguments
--FILE--
<?php

foreach (get_declared_classes() as $class) {
try {
new $class;
} catch (Throwable) {}
}

?>
===DONE===
--EXPECT--
===DONE===
23 changes: 12 additions & 11 deletions Zend/zend_operators.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,9 @@ ZEND_API zend_result ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *o
}
/* }}} */

static zend_result ZEND_FASTCALL div_function_base(zval *result, zval *op1, zval *op2) /* {{{ */
/* Returns SUCCESS/FAILURE/TYPES_NOT_HANDLED */
#define TYPES_NOT_HANDLED 1
static int ZEND_FASTCALL div_function_base(zval *result, zval *op1, zval *op2) /* {{{ */
{
zend_uchar type_pair = TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2));

Expand Down Expand Up @@ -1290,23 +1292,25 @@ static zend_result ZEND_FASTCALL div_function_base(zval *result, zval *op1, zval
ZVAL_DOUBLE(result, (double)Z_LVAL_P(op1) / Z_DVAL_P(op2));
return SUCCESS;
} else {
return FAILURE;
return TYPES_NOT_HANDLED;
}
division_by_0:
if (result != op1) {
ZVAL_UNDEF(result);
}
zend_throw_error(zend_ce_division_by_zero_error, "Division by zero");
return SUCCESS;
return FAILURE;
}
/* }}} */

ZEND_API zend_result ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2) /* {{{ */
{
ZVAL_DEREF(op1);
ZVAL_DEREF(op2);
if (div_function_base(result, op1, op2) == SUCCESS) {
return SUCCESS;

int retval = div_function_base(result, op1, op2);
if (retval != TYPES_NOT_HANDLED) {
return retval;
}

ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_DIV);
Expand All @@ -1325,12 +1329,9 @@ ZEND_API zend_result ZEND_FASTCALL div_function(zval *result, zval *op1, zval *o
zval_ptr_dtor(result);
}

if (div_function_base(result, &op1_copy, &op2_copy) == SUCCESS) {
return SUCCESS;
}

ZEND_ASSERT(0 && "Operation must succeed");
return FAILURE;
retval = div_function_base(result, &op1_copy, &op2_copy);
ZEND_ASSERT(retval != TYPES_NOT_HANDLED && "Types should be handled");
return retval;
}
/* }}} */

Expand Down
Loading