Skip to content

Commit 0ff7fb0

Browse files
committed
Merge remote-tracking branch 'origin/PHP-5.6' into str_size_and_int64_56_backport
* origin/PHP-5.6: (131 commits) Enable $ replacement in exif, ldap, pdo_pgsql and tidy See bug #67635 NEWS NEWS improve previous, add message during configure Fixed bug #67635 php links to systemd libraries without using pkg-config Improve fix for #66608 Fixed segfault with empty break New added opcodes don't need to be resloved Update NEWS Update NEWS Update NEWS Fixed bug #66827 Session raises E_NOTICE when session name variable is array implemented copy libs of core exts in phpize mode fix copy the ext dll into the prefix path in phpize mode fix default prefix in phpize mode fix file with zero size usage in phpize mode Update NEWS Fixed bug #66608 (Incorrect behavior with nested "finally" blocks) Enable build without atoll (e.g old AIX flavours) ... Conflicts: Zend/zend_opcode.c ext/date/php_date.c ext/mysqli/mysqli.c ext/pgsql/pgsql.c ext/session/session.c ext/spl/spl_array.c ext/standard/http_fopen_wrapper.c ext/standard/string.c sapi/litespeed/lsapi_main.c
2 parents 96783bd + b131b03 commit 0ff7fb0

Some content is hidden

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

74 files changed

+1088
-198
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ sapi/nsapi/nsapi.c ident
2222
sapi/continuity/capi.c ident
2323
Zend/RFCs/002.txt ident
2424
Zend/RFCs/003.txt ident
25+
ext/exif/exif.c ident
26+
ext/ldap/ldap.c ident
27+
ext/pdo_pgsql/pdo_pgsql.c ident
28+
ext/tidy/tidy.c ident
2529
NEWS merge=NEWS
2630
UPGRADING merge=NEWS
2731
UPGRADING.INTERNALS merge=NEWS

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ notifications:
88
email:
99
on_failure: change
1010

11+
cache:
12+
- apt
13+
1114
env:
1215
global:
1316
- MYSQL_TEST_HOST=127.0.0.1
@@ -21,6 +24,12 @@ env:
2124
- ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=0
2225
- ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=1
2326

27+
before_install:
28+
- sudo apt-get update -qq
29+
- sudo apt-get install -y libenchant-dev libaspell-dev libpspell-dev librecode-dev
30+
- sudo cp ./travis/de /var/lib/locales/supported.d/de
31+
- sudo dpkg-reconfigure locales
32+
2433
before_script:
2534
# Compile PHP
2635
- ./travis/compile.sh

NEWS

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,74 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2014, PHP 5.6.0 Release Candidate 3
44

5+
- Core:
6+
. Fixed bug #67497 (eval with parse error causes segmentation fault in
7+
generator). (Nikita)
8+
. Fixed bug #67151 (strtr with empty array crashes). (Nikita)
9+
. Fixed bug #67407 (Windows 8.1/Server 2012 R2 reported as Windows 8/Server
10+
2012). (Christian Wenz)
11+
. Fixed bug #66608 (Incorrect behavior with nested "finally" blocks).
12+
(Laruence, Dmitry)
13+
. Implemented FR #34407 (ucwords and Title Case). (Tjerk)
14+
15+
- CLI server:
16+
. Fixed bug #66830 (Empty header causes PHP built-in web server to hang).
17+
(Adam)
18+
. Fixed bug #67594 (Unable to access to apache_request_headers() elements).
19+
(Tjerk)
20+
21+
- FPM:
22+
. Fixed bug #67530 (error_log=syslog ignored). (Remi)
23+
. Fixed bug #67635 (php links to systemd libraries without using pkg-config).
24+
(pacho@gentoo.org, Remi)
25+
26+
- Intl:
27+
. Fixed bug #66921 (Wrong argument type hint for function
28+
intltz_from_date_time_zone). (Stas)
29+
. Fixed bug #67052 (NumberFormatter::parse() resets LC_NUMERIC setting).
30+
(Stas)
31+
32+
- pgsql:
33+
. Fixed bug #67555 (Cannot build against libpq 7.3). (Adam)
34+
35+
- OpenSSL:
36+
. Fixed bug #67609 (TLS connections fail behind HTTP proxy). (Daniel Lowrey)
37+
. Fixed broken build against OpenSSL older than 0.9.8 where ECDH unavailable.
38+
(Lior Kaplan)
39+
40+
- Phar:
41+
. Fixed bug #67587 (Redirection loop on nginx with FPM). (Christian Weiske)
42+
43+
- SPL:
44+
. Fixed bug #67539 (ArrayIterator use-after-free due to object change during
45+
sorting). (research at insighti dot org, Laruence)
46+
. Fixed bug #67538 (SPL Iterators use-after-free). (CVE-2014-4670) (Laruence)
47+
48+
- Session:
49+
. Fixed bug #66827 (Session raises E_NOTICE when session name variable is array).
50+
(Yasuo)
51+
52+
- OPCache:
53+
. Fixed bug #67215 (php-cgi work with opcache, may be segmentation fault
54+
happen) (Dmitry, Laruence)
55+
56+
- phpdbg
57+
. Fixed bug #67575 (Compilation fails for phpdbg when the
58+
build directory != src directory). (Andy Thompson)
59+
560
03 Jul 2014, PHP 5.6.0 Release Candidate 2
661

762
- Core:
63+
. Fixed bug #67091 (make install fails to install libphp5.so on FreeBSD 10.0).
64+
(Ferenc)
865
. Fixed bug #67368 (Memory leak with immediately dereferenced array in class
966
constant). (Laruence)
1067
. Fixed bug #67468 (Segfault in highlight_file()/highlight_string()).
1168
(Andreas Ferber)
12-
. Fixed bug #67091 (make install fails to install libphp5.so on FreeBSD 10.0).
13-
(Ferenc)
1469
. Fixed bug #67498 (phpinfo() Type Confusion Information Leak Vulnerability).
1570
(Stefan Esser)
71+
. Fixed bug #67551 (php://input temp file will be located in sys_temp_dir
72+
instead of upload_tmp_dir). (Mike)
1673

1774
- FPM:
1875
. Fix bug #67531 (syslog cannot be set in pool configuration). (Remi)

Zend/tests/bug66608.phpt

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
--TEST--
2+
Bug #66608 (Incorrect behavior with nested "finally" blocks)
3+
--FILE--
4+
<?php
5+
function bar() {
6+
try {
7+
echo "1\n";
8+
try {
9+
} finally {
10+
try {
11+
} finally {
12+
}
13+
echo "2\n";
14+
}
15+
} finally {
16+
try {
17+
throw new Exception ("");
18+
} catch (Exception $ab) {
19+
echo "3\n";
20+
} finally {
21+
try {
22+
} finally {
23+
echo "4\n";
24+
try {
25+
} finally {
26+
}
27+
echo "5\n";
28+
}
29+
}
30+
echo "6\n";
31+
try {
32+
} finally {
33+
while (1) {
34+
try {
35+
echo "7\n";
36+
break;
37+
} finally {
38+
echo "8\n";
39+
}
40+
echo "bad";
41+
}
42+
echo "9\n";
43+
while (1) {
44+
try {
45+
throw new Exception("");
46+
} catch(Exception $e) {
47+
echo "10\n";
48+
break;
49+
} finally {
50+
echo "11\n";
51+
}
52+
echo "bak\n";
53+
}
54+
}
55+
echo "12\n";
56+
}
57+
echo "13\n";
58+
}
59+
bar();
60+
--EXPECT--
61+
1
62+
2
63+
3
64+
4
65+
5
66+
6
67+
7
68+
8
69+
9
70+
10
71+
11
72+
12
73+
13
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
--TEST--
2+
Constant expressions with arrays
3+
--FILE--
4+
<?php
5+
const a = [1,2,[3,[4]]];
6+
const b = a[0];
7+
const c = a[2][0];
8+
const d = a[2];
9+
const e = ["string" => [1]]["string"][0];
10+
11+
var_dump(b, c, e);
12+
13+
function test ($a = d[1][0]) {
14+
var_dump($a);
15+
}
16+
17+
test();
18+
19+
class foo {
20+
const bar = [1][0];
21+
}
22+
23+
var_dump(foo::bar);
24+
25+
var_dump(a); // Eventually allow that later with array dereferencing of constants
26+
27+
?>
28+
--EXPECTF--
29+
int(1)
30+
int(3)
31+
int(1)
32+
int(4)
33+
int(1)
34+
35+
Fatal error: Arrays are not allowed in constants at run-time in %s on line %d
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
Self-referencing constant expression (part of a constant AST)
3+
--XFAIL--
4+
Not yet fixed, to be fixed for PHP 5.6
5+
--FILE--
6+
<?php
7+
class A {
8+
const FOO = [self::BAR];
9+
const BAR = [self::FOO];
10+
}
11+
var_dump(A::FOO);
12+
?>
13+
--EXPECTF--
14+
Fatal error: Cannot declare self-referencing constant 'self::FOO' in %s on line %d
15+

Zend/tests/generators/bug67497.phpt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
Bug #67467: eval with parse error causes segmentation fault in generator
3+
--FILE--
4+
<?php
5+
6+
function gen() {
7+
$a = 1;
8+
yield $a;
9+
}
10+
11+
@eval('abc');
12+
13+
$values = gen();
14+
$values->next();
15+
16+
?>
17+
===DONE===
18+
--EXPECT--
19+
===DONE===

Zend/tests/try_finally_011.phpt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
Try finally (segfault with empty break)
3+
--FILE--
4+
<?php
5+
function foo () {
6+
try {
7+
break;
8+
} finally {
9+
}
10+
}
11+
12+
foo();
13+
?>
14+
--EXPECTF--
15+
Fatal error: Cannot break/continue 1 level in %stry_finally_011.php on line %d

Zend/zend_compile.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,9 @@ int zend_add_literal(zend_op_array *op_array, const zval *zv TSRMLS_DC);
868868
#define ZEND_FAST_RET_TO_CATCH 1
869869
#define ZEND_FAST_RET_TO_FINALLY 2
870870

871+
#define ZEND_FAST_CALL_FROM_CATCH 1
872+
#define ZEND_FAST_CALL_FROM_FINALLY 2
873+
871874
END_EXTERN_C()
872875

873876
#define ZEND_CLONE_FUNC_NAME "__clone"

Zend/zend_generators.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished
125125
/* A fatal error / die occurred during the generator execution. Trying to clean
126126
* up the stack may not be safe in this case. */
127127
if (CG(unclean_shutdown)) {
128+
generator->execute_data = NULL;
128129
return;
129130
}
130131

0 commit comments

Comments
 (0)