Skip to content

Commit c9f6738

Browse files
committed
Merge branch 'master' of https://github.com/php/php-src into vm_stack_restructuring
2 parents 82d44e6 + 5c1c8f1 commit c9f6738

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+62388
-32942
lines changed

NEWS

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,20 @@ PHP NEWS
1919
. Fixed bug #60052 (Integer returned as a 64bit integer on X64_86). (Mariuz)
2020

2121
- Pgsql:
22-
. Implemented FR #31021 (pg_result_notice() is needed to get all notice
22+
. Implemented FR #31021 (pg_last_notice() is needed to get all notice
2323
messages). (Yasuo)
2424
. Implemented FR #48532 (Allow pg_fetch_all() to index numerically). (Yasuo)
2525

26+
- SQLite3:
27+
. Implemented FR #71159 (Upgraded bundled SQLite lib to 3.9.2). (Laruence)
28+
2629
- Standard:
2730
. Fixed bug #71100 (long2ip() doesn't accept integers in strict mode).
2831
(Laruence)
2932
. Implemented FR #55716 (Add an option to pass a custom stream context to
3033
get_headers()). (Ferenc)
34+
. Additional validation for parse_url() for login/pass components).
35+
(Ilia) (Julien)
3136
. Implemented FR #69359 (Provide a way to fetch the current environment
3237
variables). (Ferenc)
3338

UPGRADING

+17-6
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ PHP 7.1 UPGRADE NOTES
4646
current environment variables will be returned as an associative array
4747
when omitted.
4848
- long2ip() accepts integer as parameter now
49-
- pg_last_notice() accepts optional 2nd bool parameter to get all notices and
50-
returns empty string or array on successful calls. It returned FALSE for
51-
empty notice previously.
52-
- pg_fetch_all() accepts optional 2nd bool parameter to get numerically indexed
53-
rows.
54-
- pg_select() accepts PGSQL_FETCH_NUM option to get numerically indexed rows.
49+
- pg_last_notice() accepts optional long parameter to specify operation.
50+
PGSQL_NOTICE_LAST - Get last notice (Default)
51+
PGSQL_NOTICE_ALL - Get all stored notices
52+
PGSQL_NOTICE_CLEAR - Remove all stored notices
53+
It returns empty string or array on successful PGSQL_NOTICE_LAST/ALL calls.
54+
It returned FALSE for empty notice previously.
55+
- pg_fetch_all() accepts 2nd optional result type parameter like
56+
pg_fetch_row().
57+
- pg_select() accepts 4th optional result type parameter like pg_fetch_row().
58+
- parse_url() is more restrictive now and supports RFC3986.
5559

5660
========================================
5761
6. New Functions
@@ -68,11 +72,18 @@ PHP 7.1 UPGRADE NOTES
6872
========================================
6973
9. Other Changes to Extensions
7074
========================================
75+
- SQLite3:
76+
. Upgraded bundled SQLite lib to 3.9.2
7177

7278
========================================
7379
10. New Global Constants
7480
========================================
7581

82+
- Pgsql:
83+
PGSQL_NOTICE_LAST
84+
PGSQL_NOTICE_ALL
85+
PGSQL_NOTICE_CLEAR
86+
7687
========================================
7788
11. Changes to INI File Handling
7889
========================================

Zend/tests/bug41813.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $foo[0]->bar = "xyz";
99
echo "Done\n";
1010
?>
1111
--EXPECTF--
12-
Fatal error: Uncaught Error: Cannot use string offset as an array in %s:%d
12+
Fatal error: Uncaught Error: Cannot use string offset as an object in %s:%d
1313
Stack trace:
1414
#0 {main}
1515
thrown in %s on line %d

Zend/tests/bug49866.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $b = &$a[1];
77
$b = "f";
88
echo $a;
99
--EXPECTF--
10-
Fatal error: Uncaught Error: Cannot create references to/from string offsets nor overloaded objects in %sbug49866.php:3
10+
Fatal error: Uncaught Error: Cannot create references to/from string offsets in %sbug49866.php:3
1111
Stack trace:
1212
#0 {main}
1313
thrown in %sbug49866.php on line 3

Zend/tests/bug52355.phpt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
Bug #52355 (Negating zero does not produce negative zero)
3+
--FILE--
4+
<?php
5+
6+
var_dump(-0.0);
7+
var_dump(-(float)"0");
8+
9+
$foo = -sin(0);
10+
11+
var_dump($foo);
12+
13+
var_dump(@(1.0 / -0.0));
14+
15+
?>
16+
--EXPECT--
17+
float(-0)
18+
float(-0)
19+
float(-0)
20+
float(-INF)

Zend/tests/bug70083.phpt

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--TEST--
2+
Bug #70083 (Use after free with assign by ref to overloaded objects)
3+
--FILE--
4+
<?php
5+
6+
class foo {
7+
private $var;
8+
function __get($e) {
9+
return $this;
10+
}
11+
}
12+
13+
function &noref() { $foo = 1; return $foo; }
14+
15+
$foo = new foo;
16+
$foo->i = &noref();
17+
var_dump($foo);
18+
19+
?>
20+
--EXPECTF--
21+
22+
Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %s:%d
23+
Stack trace:
24+
#0 {main}
25+
thrown in %s on line %d
26+

Zend/tests/bug70089.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ try {
3434
string(36) "Cannot use string offset as an array"
3535
string(27) "Cannot unset string offsets"
3636
string(41) "Only variables can be passed by reference"
37-
string(64) "Cannot increment/decrement overloaded objects nor string offsets"
37+
string(41) "Cannot increment/decrement string offsets"

Zend/tests/bug70804.phpt

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
Bug #70804 (Unary add on negative zero produces positive zero)
3+
--FILE--
4+
<?php
5+
6+
var_dump(+(-0.0));
7+
var_dump(+(float)"-0");
8+
9+
$foo = +(-sin(0));
10+
11+
var_dump($foo);
12+
13+
?>
14+
--EXPECT--
15+
float(-0)
16+
float(-0)
17+
float(-0)

Zend/tests/bug71154.phpt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
Bug #71154: Incorrect HT iterator invalidation causes iterator reuse
3+
--FILE--
4+
<?php
5+
6+
$array = [1, 2, 3];
7+
foreach ($array as &$ref) {
8+
/* Free array, causing free of iterator */
9+
$array = [];
10+
/* Reuse the iterator.
11+
* However it will also be reused on next foreach iteration */
12+
$it = new ArrayIterator([1, 2, 3]);
13+
$it->rewind();
14+
}
15+
var_dump($it->current());
16+
17+
?>
18+
--EXPECT--
19+
int(1)

Zend/tests/bug71163.phpt

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
--TEST--
2+
Bug #71163 (Segmentation Fault (cleanup_unfinished_calls))
3+
--FILE--
4+
<?php
5+
function __autoload($name) {
6+
eval ("class $name extends Exception { public static function foo() {}}");
7+
throw new Exception("boom");
8+
}
9+
10+
function test2() {
11+
try {
12+
Test::foo();
13+
} catch (Exception $e) {
14+
echo "okey";
15+
}
16+
}
17+
18+
function test() {
19+
test2();
20+
}
21+
22+
test();
23+
?>
24+
--EXPECT--
25+
okey

Zend/zend.c

-1
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,6 @@ ZEND_API void zend_deactivate(void) /* {{{ */
983983
fprintf(stderr, " Root Buffered buffer grey\n");
984984
fprintf(stderr, " -------- -------- ----------- ------\n");
985985
fprintf(stderr, "ZVAL %8d %8d %9d %8d\n", GC_G(zval_possible_root), GC_G(zval_buffered), GC_G(zval_remove_from_buffer), GC_G(zval_marked_grey));
986-
fprintf(stderr, "ZOBJ %8d %8d %9d %8d\n", GC_G(zobj_possible_root), GC_G(zobj_buffered), GC_G(zobj_remove_from_buffer), GC_G(zobj_marked_grey));
987986
#endif
988987

989988
zend_try {

0 commit comments

Comments
 (0)