Skip to content
forked from php/php-src

sync #4

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 71 commits into from
Sep 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
c93a7b5
Normalize behaviour of DNS function on Windows
Girgias Sep 12, 2020
3053f6f
Fix prototype of get_active_function_or_method_name()
kocsismate Sep 12, 2020
e8e4ddc
Improve parameter handling in ext/openssl
kocsismate Aug 20, 2020
1f118aa
Fix SKIPIF section for SQLite3 test
Girgias Sep 11, 2020
67d21bf
Use Error for uninitialized SQLite object
Girgias Sep 11, 2020
3854234
Fix broken test
mbeccati Sep 13, 2020
873c087
Mark tests as XFAIL on Windows
cmb69 Sep 13, 2020
71de8fe
Mark tests as XFAIL on Windows
cmb69 Sep 13, 2020
c8d47cf
Convert warnings to assetions in OCI PDO driver
Girgias Sep 12, 2020
ff0e39b
Remove @jit Docblock support for now due to dev-time constraints
beberlei Sep 12, 2020
0a03291
Allocate Windows 64 shadow stack space
dstogov Sep 14, 2020
853b794
Unmark tests as XFAIL on Windows
cmb69 Sep 14, 2020
7e0631e
Add Z_PARAM_OBJ_OF_CLASS ZPP macro
kocsismate Sep 14, 2020
eb86d08
Fix a few stub parameter types in ext/standard
kocsismate Sep 14, 2020
1c81a34
Make mb_send_mail() consistent with mail()
kocsismate Sep 14, 2020
46c0c82
Declare array|int and object-of-class|int types in stubs
kocsismate Sep 14, 2020
8e8a277
Slightly improve error handling in DatePeriod::__construct()
kocsismate Sep 14, 2020
9d3c666
Drop some dead code
nikic Sep 14, 2020
950ea89
Convert E_ERROR to Error exception in mysqli_result iterator
nikic Sep 14, 2020
bf51564
JIT for ASSIGN_OBJ_OP
dstogov Sep 14, 2020
31ef94c
Convert Division by 0 warnings to Error per the Engine Warning RFC
Girgias Sep 12, 2020
48368a6
Promote Warnings to Error in PostgreSQL PDO driver
Girgias Sep 12, 2020
57a4a2c
Fixed bug #80096
nikic Sep 14, 2020
96f2f31
Update array parameter names for named parameters
Crell Aug 26, 2020
d0111d7
Promote warnings to Errors in PostgreSQL extension
Girgias Sep 13, 2020
8f342ad
JIT for PRE/POST_INC/DEC_OBJ
dstogov Sep 14, 2020
1359a52
Rename zend_error_notify APIs to zend_observer_error*
beberlei Sep 14, 2020
ad61e14
Fix crashes with unproper cleaning of repeated yield from
bwoebi Sep 13, 2020
a351da5
Simplify zend_jit_pre/post_inc/dec_typed_ref() helpers
dstogov Sep 14, 2020
a4c3aee
Support for reference
dstogov Sep 14, 2020
4e198c0
Avoid segfault if module/extension version is not defined
cmb69 Sep 14, 2020
15236fb
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Sep 14, 2020
f51bbcc
Merge branch 'PHP-7.4' into master
cmb69 Sep 14, 2020
452f7b0
Fix use-after-free with yield from in yield_from_multi_tree_single_no…
bwoebi Sep 14, 2020
824a2bf
Promote some warnings to ValueError in OCI8
Girgias Sep 12, 2020
3228d68
Renumber ZEND_ACC_... constants
dstogov Sep 15, 2020
8f93709
micro-optimization
dstogov Sep 15, 2020
4e794b7
The next release here will be 7.4.12
derickr Sep 15, 2020
e413b4c
Merge branch 'PHP-7.4' into master
derickr Sep 15, 2020
ec3f300
Fix observer leak
nikic Sep 15, 2020
edddddc
7.3.24 is next
cmb69 Sep 15, 2020
e97aed4
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Sep 15, 2020
1bffe6b
Merge branch 'PHP-7.4' into master
cmb69 Sep 15, 2020
da0663a
Add GC_TRY_ADDREF macro
nikic Sep 15, 2020
d81ea5e
Fix preg_replace_callback_array() with array subject
nikic Sep 15, 2020
6082fd3
Add missing param type to pcre reflection test
kocsismate Sep 15, 2020
4fc7026
Convert warning to assetion in MySQL PDO driver
Girgias Sep 12, 2020
9affbef
Use normal error in SPL for 'An iterator cannot be used with foreach …
Girgias Sep 11, 2020
b620733
Use normal error in SPL for uninitialized objects
Girgias Sep 11, 2020
063fdd9
Use ValueError instead of exceptions in SPL extension
Girgias Sep 12, 2020
c1823c6
Promote warning to Error in ODBC extension
Girgias Sep 12, 2020
1a8936c
Check `ReflectionReference::fromArrayElement` with union types
carusogabriel Sep 14, 2020
62c20c6
Promote warnings to Error in SNMP extension
Girgias Sep 8, 2020
c37a1cd
Promote a few remaining errors in ext/standard
kocsismate Sep 10, 2020
fa5a25b
Adjust ext/openssl parameter names
kocsismate Sep 12, 2020
2408991
Remove unintendedly committed test
kocsismate Sep 15, 2020
f5bbb04
Tracing JIT for INIT_DYNAMIC_CALL (closure only)
dstogov Sep 15, 2020
16b9f19
Fix compile-time/run-time discrepancies with unary operators
nikic Sep 15, 2020
b1c5532
fix mbfl function prototypes
remicollet Sep 15, 2020
2bbf2a9
Fix assumption about property guard hash value
nikic Sep 15, 2020
a009d37
Merge branch 'PHP-7.4'
nikic Sep 15, 2020
3c53732
Fix undef var exception handling in JMP_NULL
nikic Sep 15, 2020
7e61c2e
Fix uninitialized run-time cache when resolving named param defaults
nikic Sep 15, 2020
7a95e94
Promote warnings to Error in MySQLi extension
Girgias Jul 3, 2020
6d538e8
Fix OSS Fuzz issue: yielding from an aborted generator
bwoebi Sep 15, 2020
a4a5cdd
Update NEWS for PHP 8.0.0beta4
sgolemon Sep 15, 2020
f888674
Update NEWS for 8.0.0RC1
sgolemon Sep 15, 2020
95f4ee3
Add some ValueErrors to ext/date
Girgias May 22, 2020
effa3b0
missing fix for test for new param. name
remicollet Sep 16, 2020
5f1fb1a
JIT for INIT_METHOD_CALL
dstogov Sep 16, 2020
e277763
Fixed incorrect constant string access
dstogov Sep 16, 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
8 changes: 7 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.0.0rc1
?? ??? ????, PHP 8.0.0RC1


17 Sep 2020, PHP 8.0.0beta4

- Core:
. Implement #[Attr] Attribute syntax as per final vote in RFC
https://wiki.php.net/rfc/shorter_attribute_syntax_change
. Fixed bug #80045 (memleak after two set_exception_handler calls with
__call). (Nikita)
. Fixed bug #80096 (Segmentation fault with named arguments in nested call).
(Nikita)
. Fixed faulty generator cleanup with yield from. (Bob)

- Date:
. Fixed bug #80057 (DateTimeImmutable::createFromFormat() does not populate
Expand Down
10 changes: 5 additions & 5 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -370,19 +370,19 @@ PHP 8.0 INTERNALS UPGRADE NOTES

u. Instead of overwriting zend_error_cb extensions with debugging, monitoring
use-cases catching Errors/Exceptions are strongly encouraged to use
the new error notification API instead.
the new error observer API instead.

Error notification callbacks are guaranteed to be called regardless of
Error observering callbacks are guaranteed to be called regardless of
the users error_reporting setting or userland error handler return values.

Register notification callbacks during MINIT of an extension:
Register observer callbacks during MINIT of an extension:

void my_error_notify_cb(int type,
void my_error_observer_cb(int type,
const char *error_filename,
uint32_t error_lineno,
zend_string *message) {
}
zend_register_error_notify_callback(my_error_notify_cb);
zend_observer_error_register(my_error_observer_cb);

v. The following APIs have been removed from the Zend Engine:
- zend_ts_hash_init_ex(), drop the last argument and use zend_ts_hash_init() instead
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug31720.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ try {
?>
--EXPECTF--
Warning: Undefined variable $nonesuchvar in %s on line %d
array_walk(): Argument #2 ($funcname) must be a valid callback, first array member is not a valid class name or object
array_walk(): Argument #2 ($callback) must be a valid callback, first array member is not a valid class name or object
2 changes: 1 addition & 1 deletion Zend/tests/bug41026.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ echo "Done\n";
--EXPECT--
Done

Warning: (Registered shutdown functions) Unable to call self::on_shutdown() - function does not exist in Unknown on line 0
Fatal error: Registered shutdown function self::on_shutdown() cannot be called, function does not exist in Unknown on line 0
8 changes: 6 additions & 2 deletions Zend/tests/bug52355.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ $foo = -sin(0);

var_dump($foo);

var_dump(@(1.0 / -0.0));
try {
var_dump(1.0 / -0.0);
} catch (\DivisionByZeroError $e) {
echo $e->getMessage() . \PHP_EOL;
}

?>
--EXPECT--
float(-0)
float(-0)
float(-0)
float(-INF)
Division by zero
17 changes: 10 additions & 7 deletions Zend/tests/bug69957.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,26 @@ try {
}

?>
--EXPECTF--
Warning: Division by zero in %sbug69957.php on line %d
float(INF)
--EXPECT--
Variable div
Type: DivisionByZeroError
Message: Division by zero

Variable mod
Type: DivisionByZeroError
Message: Modulo by zero

Warning: Division by zero in %sbug69957.php on line %d
float(INF)
Literal div
Type: DivisionByZeroError
Message: Division by zero

Literal mod
Type: DivisionByZeroError
Message: Modulo by zero

Warning: Division by zero in %sbug69957.php on line %d
float(INF)
Double div
Type: DivisionByZeroError
Message: Division by zero

Double mod
Type: DivisionByZeroError
Expand Down
21 changes: 6 additions & 15 deletions Zend/tests/bug76667.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,14 @@ class T {
}

$x = new T;
$x->x = 1;
try {
$x->x = 1;
} catch (\DivisionByZeroError $e) {
echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECTF--
Warning: Undefined variable $undefined in %s on line %d

Warning: Attempt to read property "1" on null in %s on line %d

Warning: Division by zero in %s on line %d

Warning: Undefined variable $undefined in %s on line %d

Warning: Attempt to read property "NAN" on null in %s on line %d

Warning: Division by zero in %s on line %d

Warning: Undefined variable $undefined in %s on line %d

Warning: Attempt to read property "NAN" on null in %s on line %d

Warning: Division by zero in %s on line %d
Division by zero
14 changes: 14 additions & 0 deletions Zend/tests/bug80096.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--TEST--
Bug #80096: Segmentation fault with named arguments in nested call
--FILE--
<?php

function println($arg) {
echo $arg, "\n";
}

println(htmlentities("The < character is encoded as &lt;", double_encode: false));

?>
--EXPECT--
The &lt; character is encoded as &lt;
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--TEST--
A generator can be yielded from multiple times, testing immediate release of the yield from'ing generator
--FILE--
<?php

function gen() {
yield 42;
}
function yield_from($gen) {
yield from $gen;
}
$gen = gen();
var_dump(yield_from($gen)->current());
var_dump(yield_from($gen)->current());

?>
--EXPECT--
int(42)
int(42)
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--TEST--
Impossible to yield from a generator which already failed, nested version
--FILE--
<?php

function from() {
yield 0;
throw new Exception();
}
function gen($gen) {
yield from $gen;
}

$gen1 = from();
$gen2 = gen($gen1);
$gen3 = gen($gen1);
try {
$gen2->next();
} catch (Exception $e) {
unset($gen2);
}
$gen3->next();

?>
--EXPECTF--
Fatal error: Uncaught Error: Generator passed to yield from was aborted without proper return and is unable to continue in %s:%d
Stack trace:
#0 [internal function]: gen(Object(Generator))
#1 %s(%d): Generator->next()
#2 {main}
thrown in %s on line %d
Loading