Compare commits

...
8 Commits
Author SHA1 Message Date
Joe Watkins 9f1492bb89 bump version for release 2017-03-14 13:16:07 +00:00
Joe Watkins e6e45428d3 sync news 2017-03-14 13:11:58 +00:00
Derick Rethans b29369b539 Make sure we anchor this test to February 2017-03-03 10:20:57 +00:00
Mitch Hagstrand 4ba4fc8a46 Fix bug73858.phpt to work in months without 31 days
Used hardcoded months in bug73858.phpt rather than the current and previous
month.
2017-03-03 10:20:45 +00:00
Joe Watkins d03d7ee6b8 Revert "Fix bug #74159"
This reverts commit e9873d9853.
2017-03-03 06:29:46 +00:00
Joe Watkins f19c3d4bdf Revert "Update test for bug #74159"
This reverts commit ff8a6b1232.
2017-03-03 06:29:31 +00:00
Remi Collet 33444dc0b0 make test slower again 2017-02-28 14:14:31 +00:00
Joe Watkins a64b17ffde bump version for RC1 2017-02-28 09:48:37 +00:00
7 changed files with 27 additions and 145 deletions

No files matched your search

+1 -3
View File
@@ -1,6 +1,6 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2017, PHP 7.1.3
16 Mar 2017, PHP 7.1.3
- Core:
. Fixed bug #74157 (Segfault with nested generators). (Laruence)
@@ -50,8 +50,6 @@ PHP NEWS
. Fixed bug #74022 (PHP Fast CGI crashes when reading from a pfx file).
(Anatol)
. Fixed bug #74099 (Memory leak with openssl_encrypt()). (Andrew Nester)
. Fixed bug #74159 (Writing a large buffer to a non-blocking encrypted stream
fails with "bad write retry"). (trowski)
- Standard:
. Fixed bug #74005 (mail.add_x_header causes RFC-breaking lone line feed).
+20 -20
View File
@@ -1,20 +1,20 @@
--TEST--
Bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
if (PHP_ZTS) die("skip only for no-zts build");
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip not for Windows");
?>
--INI--
memory_limit=1G
max_execution_time=1
hard_timeout=1
--FILE--
<?php
$a1 = range(1, 1000000);
$a2 = range(100000, 999999);
array_intersect($a1, $a2);
?>
--EXPECTF--
Fatal error: Maximum execution time of 1+1 seconds exceeded %s
--TEST--
Bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
if (PHP_ZTS) die("skip only for no-zts build");
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip not for Windows");
?>
--INI--
memory_limit=1G
max_execution_time=1
hard_timeout=1
--FILE--
<?php
$a1 = range(1, 1000000);
$a2 = range(100000, 1999999);
array_intersect($a1, $a2);
?>
--EXPECTF--
Fatal error: Maximum execution time of 1+1 seconds exceeded %s
+1 -1
View File
@@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=1
PHP_RELEASE_VERSION=3
PHP_EXTRA_VERSION="-dev"
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
+3 -3
View File
@@ -7,8 +7,8 @@ In the "verbose setup method" I'm trying setup the DateTime object myself
to see if it's the format string which is parsed in correctly or if it's the DateTime
object which is breaking stuff. From the testing it appears DateTime is broken somehow.
*/
$ss = 'first day of last month midnight';
$es = 'first day of this month midnight - 1 second';
$ss = 'february first day of last month midnight';
$es = 'february first day of this month midnight - 1 second';
$s = new DateTime($ss);
$e = new DateTime($es);
@@ -50,7 +50,7 @@ effect on the results of the diff. By modifying the datetime with ->modify every
it just means you have to be careful of how we work with DateTimes .
*/
$s = new DateTime($ss);
$e = new DateTime('first day of this month midnight');
$e = new DateTime('february first day of this month midnight');
$e->modify('- 1 second');
var_dump($e->diff($s)->days); // 30 ... and should be 30
?>
-106
View File
@@ -1,106 +0,0 @@
--TEST--
Bug #74159: Writing a large buffer to non-blocking encrypted streams fails
--SKIPIF--
<?php
if (!extension_loaded("openssl")) die("skip openssl not loaded");
if (!function_exists("proc_open")) die("skip no proc_open");
--FILE--
<?php
$serverCode = <<<'CODE'
$serverUri = "ssl://127.0.0.1:64321";
$serverFlags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;
$serverCtx = stream_context_create(['ssl' => [
'local_cert' => __DIR__ . '/bug54992.pem',
'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_SERVER,
]]);
$server = stream_socket_server($serverUri, $errno, $errstr, $serverFlags, $serverCtx);
phpt_notify();
$client = stream_socket_accept($server, 1);
if (!$client) {
exit();
}
$data = '';
while (strlen($data) < 0xfffff) {
$buffer = fread($client, 8192);
if (empty($buffer)) {
exit();
}
$data .= $buffer;
usleep(100);
}
fclose($client);
CODE;
$clientCode = <<<'CODE'
function streamRead($stream) : int {
return strlen(fread($stream, 8192));
}
function streamWrite($stream, $data) : int {
return fwrite($stream, $data);
}
function waitForWrite(...$streams) : bool {
$read = null;
$except = null;
while($streams && !($n = stream_select($read, $streams, $except, 1)));
return $n > 0;
}
function waitForRead(...$streams) : bool {
$write = null;
$except = null;
while ($streams && !($n = stream_select($streams, $write, $except, 1)));
return $n > 0;
}
set_error_handler(function ($errno, $errstr) {
exit("$errstr\n");
});
$serverUri = "tcp://127.0.0.1:64321";
$clientFlags = STREAM_CLIENT_CONNECT;
$clientCtx = stream_context_create(['ssl' => [
'verify_peer' => true,
'cafile' => __DIR__ . '/bug54992-ca.pem',
'peer_name' => 'bug54992.local',
]]);
phpt_wait();
$fp = stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx);
stream_set_blocking($fp, false);
while (0 === ($n = stream_socket_enable_crypto($fp, true, STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT)));
$data = str_repeat("a", 0xfffff);
$written = 0;
$total = $written;
while(!empty($data)) {
$written = streamWrite($fp, $data);
$total += $written;
$data = substr($data, $written);
waitForWrite($fp);
}
printf("Written %d bytes\n", $total);
while(waitForRead($fp)) {
streamRead($fp);
if (feof($fp)) {
break;
}
}
exit("DONE\n");
CODE;
include 'ServerClientTestCase.inc';
ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
--EXPECTF--
Written 1048575 bytes
DONE
-10
View File
@@ -1640,16 +1640,6 @@ int php_openssl_setup_crypto(php_stream *stream,
SSL_set_mode(sslsock->ssl_handle, mode | SSL_MODE_RELEASE_BUFFERS);
} while (0);
#endif
do {
long mode = SSL_get_mode(sslsock->ssl_handle);
SSL_set_mode(sslsock->ssl_handle, mode | SSL_MODE_ENABLE_PARTIAL_WRITE);
} while (0);
do {
long mode = SSL_get_mode(sslsock->ssl_handle);
SSL_set_mode(sslsock->ssl_handle, mode | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
} while (0);
if (cparam->inputs.session) {
if (cparam->inputs.session->ops != &php_openssl_socket_ops) {
+2 -2
View File
@@ -3,6 +3,6 @@
#define PHP_MAJOR_VERSION 7
#define PHP_MINOR_VERSION 1
#define PHP_RELEASE_VERSION 3
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "7.1.3-dev"
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "7.1.3"
#define PHP_VERSION_ID 70103