mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-10 02:30:50 +00:00
Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21465ec0e1 | ||
|
|
813279f4b4 | ||
|
|
d428155055 | ||
|
|
0e7490f49e | ||
|
|
4f40d81b8d | ||
|
|
e1dc9d6c1e | ||
|
|
525c80ec74 | ||
|
|
770db7e68c | ||
|
|
1b63ca3c78 | ||
|
|
b70fcdd841 | ||
|
|
a2058937bc | ||
|
|
b6af9da5a0 | ||
|
|
4c6de12b2d |
No files matched your search
@@ -1,6 +1,6 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 7.3.7
|
||||
04 Jul 2019, PHP 7.3.7
|
||||
|
||||
- Core:
|
||||
. Fixed bug #76980 (Interface gets skipped if autoloader throws an exception).
|
||||
@@ -23,6 +23,8 @@ PHP NEWS
|
||||
- Opcache:
|
||||
. Fixed bug #78015 (Incorrect evaluation of expressions involving partials
|
||||
arrays in SCCP). (Nikita)
|
||||
. Fixed bug #78106 (Path resolution fails if opcache disabled during request).
|
||||
(Nikita)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #78079 (openssl_encrypt_ccm.phpt fails with OpenSSL 1.1.1c).
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
#ifndef ZEND_H
|
||||
#define ZEND_H
|
||||
|
||||
#define ZEND_VERSION "3.3.7-dev"
|
||||
#define ZEND_VERSION "3.3.7"
|
||||
|
||||
#define ZEND_ENGINE_3
|
||||
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=3
|
||||
PHP_RELEASE_VERSION=7
|
||||
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`
|
||||
|
||||
|
||||
@@ -2204,6 +2204,7 @@ static int try_remove_definition(sccp_ctx *ctx, int var_num, zend_ssa_var *var,
|
||||
if (opline->opcode == ZEND_DO_ICALL) {
|
||||
removed_ops = remove_call(ctx, opline, ssa_op);
|
||||
} else if (opline->opcode == ZEND_TYPE_CHECK
|
||||
&& opline->op1_type & (IS_VAR|IS_TMP_VAR)
|
||||
&& !value_known(&ctx->values[ssa_op->op1_use])) {
|
||||
/* For TYPE_CHECK we may compute the result value without knowing the
|
||||
* operand, based on type inference information. Make sure the operand is
|
||||
|
||||
@@ -432,7 +432,7 @@ static zend_always_inline zend_string *accel_find_interned_string(zend_string *s
|
||||
|
||||
if (!ZCG(counted)) {
|
||||
if (!ZCG(accelerator_enabled) || accel_activate_add() == FAILURE) {
|
||||
return str;
|
||||
return NULL;
|
||||
}
|
||||
ZCG(counted) = 1;
|
||||
}
|
||||
@@ -754,10 +754,9 @@ static void accel_use_shm_interned_strings(void)
|
||||
if (ZCSG(interned_strings).saved_top == NULL) {
|
||||
accel_copy_permanent_strings(accel_new_interned_string);
|
||||
} else {
|
||||
ZCG(counted) = 1;
|
||||
accel_copy_permanent_strings(accel_replace_string_by_shm_permanent);
|
||||
if (ZCG(counted)) {
|
||||
accel_deactivate_sub();
|
||||
}
|
||||
ZCG(counted) = 0;
|
||||
}
|
||||
accel_interned_strings_save_state();
|
||||
|
||||
@@ -1187,7 +1186,11 @@ char *accel_make_persistent_key(const char *path, size_t path_length, int *key_l
|
||||
cwd_len = ZCG(cwd_key_len) = buf + sizeof(buf) - 1 - res;
|
||||
cwd = ZCG(cwd_key);
|
||||
memcpy(ZCG(cwd_key), res, cwd_len + 1);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1226,7 +1229,11 @@ char *accel_make_persistent_key(const char *path, size_t path_length, int *key_l
|
||||
include_path_len = ZCG(include_path_key_len) = buf + sizeof(buf) - 1 - res;
|
||||
include_path = ZCG(include_path_key);
|
||||
memcpy(ZCG(include_path_key), res, include_path_len + 1);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1907,11 +1914,22 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
|
||||
int key_length;
|
||||
int from_shared_memory; /* if the script we've got is stored in SHM */
|
||||
|
||||
if (!file_handle->filename || !ZCG(enabled) || !accel_startup_ok) {
|
||||
if (!file_handle->filename || !ZCG(accelerator_enabled)) {
|
||||
/* The Accelerator is disabled, act as if without the Accelerator */
|
||||
ZCG(cache_opline) = NULL;
|
||||
ZCG(cache_persistent_script) = NULL;
|
||||
#ifdef HAVE_OPCACHE_FILE_CACHE
|
||||
if (file_handle->filename
|
||||
&& ZCG(accel_directives).file_cache
|
||||
&& ZCG(enabled) && accel_startup_ok) {
|
||||
return file_cache_compile_file(file_handle, type);
|
||||
}
|
||||
#endif
|
||||
return accelerator_orig_compile_file(file_handle, type);
|
||||
#ifdef HAVE_OPCACHE_FILE_CACHE
|
||||
} else if (file_cache_only) {
|
||||
ZCG(cache_opline) = NULL;
|
||||
ZCG(cache_persistent_script) = NULL;
|
||||
return file_cache_compile_file(file_handle, type);
|
||||
#endif
|
||||
} else if (!ZCG(accelerator_enabled) ||
|
||||
@@ -1921,6 +1939,8 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
|
||||
return file_cache_compile_file(file_handle, type);
|
||||
}
|
||||
#endif
|
||||
ZCG(cache_opline) = NULL;
|
||||
ZCG(cache_persistent_script) = NULL;
|
||||
return accelerator_orig_compile_file(file_handle, type);
|
||||
}
|
||||
|
||||
@@ -1947,10 +1967,14 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
|
||||
/* try to find cached script by key */
|
||||
key = accel_make_persistent_key(file_handle->filename, strlen(file_handle->filename), &key_length);
|
||||
if (!key) {
|
||||
ZCG(cache_opline) = NULL;
|
||||
ZCG(cache_persistent_script) = NULL;
|
||||
return accelerator_orig_compile_file(file_handle, type);
|
||||
}
|
||||
persistent_script = zend_accel_hash_str_find(&ZCSG(hash), key, key_length);
|
||||
} else if (UNEXPECTED(is_stream_path(file_handle->filename) && !is_cacheable_stream_path(file_handle->filename))) {
|
||||
ZCG(cache_opline) = NULL;
|
||||
ZCG(cache_persistent_script) = NULL;
|
||||
return accelerator_orig_compile_file(file_handle, type);
|
||||
}
|
||||
|
||||
@@ -2315,6 +2339,7 @@ static void accel_reset_pcre_cache(void)
|
||||
static void accel_activate(void)
|
||||
{
|
||||
if (!ZCG(enabled) || !accel_startup_ok) {
|
||||
ZCG(accelerator_enabled) = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2342,6 +2367,7 @@ static void accel_activate(void)
|
||||
|
||||
#ifdef HAVE_OPCACHE_FILE_CACHE
|
||||
if (file_cache_only) {
|
||||
ZCG(accelerator_enabled) = 0;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -2360,7 +2386,6 @@ static void accel_activate(void)
|
||||
zend_alter_ini_entry_chars(key, "0", 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_RUNTIME);
|
||||
zend_string_release_ex(key, 0);
|
||||
zend_accel_error(ACCEL_LOG_WARNING, "Can't cache files in chroot() directory with too big inode");
|
||||
ZCG(accelerator_enabled) = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #78106: Path resolution fails if opcache disabled during request
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
include __DIR__ . "/php_cli_server.inc";
|
||||
php_cli_server_start(getenv('TEST_PHP_EXTRA_ARGS'));
|
||||
|
||||
echo file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS . "/bug78106_test1.php" );
|
||||
echo file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS . "/bug78106_test2.php" );
|
||||
echo file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS . "/bug78106_test1.php" );
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
included
|
||||
done
|
||||
included
|
||||
done
|
||||
included
|
||||
done
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
echo "included\n";
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
ini_set('opcache.enable', 0);
|
||||
require_once 'bug78106_include.inc';
|
||||
|
||||
echo "done\n";
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
require_once 'bug78106_include.inc';
|
||||
|
||||
echo "done\n";
|
||||
@@ -0,0 +1,37 @@
|
||||
--TEST--
|
||||
Bug #78185: file cache only no longer works
|
||||
--INI--
|
||||
opcache.enable_cli=1
|
||||
opcache.optimization_level=-1
|
||||
opcache.file_cache={PWD}
|
||||
opcache.file_cache_only=1
|
||||
--FILE--
|
||||
<?php
|
||||
if (substr(PHP_OS, 0, 3) !== 'WIN') {
|
||||
$pattern = __DIR__ . '/*/' . __DIR__ . '/*78185.php.bin';
|
||||
} else {
|
||||
$pattern = __DIR__ . '/*/*/' . str_replace(':', '', __DIR__) . '/*78185.php.bin';
|
||||
}
|
||||
foreach (glob($pattern) as $p) {
|
||||
var_dump($p);
|
||||
}
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
if (substr(PHP_OS, 0, 3) !== 'WIN') {
|
||||
$pattern = __DIR__ . '/*/' . __DIR__ . '/*78185.php.bin';
|
||||
} else {
|
||||
$pattern = __DIR__ . '/*/*/' . str_replace(':', '', __DIR__) . '/*78185.php.bin';
|
||||
}
|
||||
foreach (glob($pattern) as $p) {
|
||||
unlink($p);
|
||||
$p = dirname($p);
|
||||
while(strlen($p) > strlen(__DIR__)) {
|
||||
rmdir($p);
|
||||
$p = dirname($p);
|
||||
}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(%d) "%s78185.php.bin"
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
Bug #78230: Incorrect type check optimization
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function test($x) {
|
||||
$y = (array) $x;
|
||||
var_dump(is_array($y));
|
||||
}
|
||||
|
||||
$ary = [1, 2];
|
||||
$ary[] = 3;
|
||||
test($ary);
|
||||
$ary[] = 4;
|
||||
var_dump($ary);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
array(4) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
[3]=>
|
||||
int(4)
|
||||
}
|
||||
@@ -240,6 +240,7 @@ static ZEND_INI_MH(OnEnable)
|
||||
return FAILURE;
|
||||
} else {
|
||||
*p = 0;
|
||||
ZCG(accelerator_enabled) = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,6 +3,6 @@
|
||||
#define PHP_MAJOR_VERSION 7
|
||||
#define PHP_MINOR_VERSION 3
|
||||
#define PHP_RELEASE_VERSION 7
|
||||
#define PHP_EXTRA_VERSION "-dev"
|
||||
#define PHP_VERSION "7.3.7-dev"
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "7.3.7"
|
||||
#define PHP_VERSION_ID 70307
|
||||
+3
-1
@@ -818,7 +818,7 @@ HELP;
|
||||
if (substr(PHP_OS, 0, 3) == "WIN") {
|
||||
$pass_options .= " -c " . escapeshellarg($conf_passed);
|
||||
} else {
|
||||
$pass_options .= " -c '$conf_passed'";
|
||||
$pass_options .= " -c '" . realpath($conf_passed) . "'";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1600,6 +1600,8 @@ TEST $file
|
||||
|
||||
settings2params($ini_settings);
|
||||
|
||||
$env['TEST_PHP_EXTRA_ARGS'] = $pass_options . ' ' . $ini_settings;
|
||||
|
||||
// Check if test should be skipped.
|
||||
$info = '';
|
||||
$warn = false;
|
||||
|
||||
Reference in new issue
Block a user