Skip to content

Commit ccba0f5

Browse files
committed
Merge branch 'PHP-7.2' of git.php.net:/php-src into PHP-7.2
* 'PHP-7.2' of git.php.net:/php-src: Yet one attempt to mitigate the unzip error on AppVeyor Ensure SDK is checked out before asking for version Fix fetching the SDK version Fix SDK version comparison and add more verbosity Don't use the cache dependency, SDK version is handled in script Remove status check on the SDK repo and add version check Use abbrev Catch with the latest AppVeyor unzip errors Fixed type inference
2 parents 118db2d + f10d8c2 commit ccba0f5

File tree

4 files changed

+36
-4
lines changed

4 files changed

+36
-4
lines changed

.appveyor.yml

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ clone_depth: 64
1818

1919
cache:
2020
- c:\build-cache
21-
- c:\build-cache\sdk -> .appveyor.yml
2221

2322
environment:
2423
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache

appveyor/build.bat

+11-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
set SDK_REMOTE=https://github.com/OSTC/php-sdk-binary-tools.git
44
set SDK_BRANCH=%PHP_BUILD_SDK_BRANCH%
5+
set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat
56

67
if not exist "%PHP_BUILD_CACHE_BASE_DIR%" (
78
echo Creating %PHP_BUILD_CACHE_BASE_DIR%
@@ -13,17 +14,25 @@ if not exist "%PHP_BUILD_OBJ_DIR%" (
1314
mkdir "%PHP_BUILD_OBJ_DIR%"
1415
)
1516

17+
if not exist "%SDK_RUNNER%" (
18+
if exist "%PHP_BUILD_CACHE_SDK_DIR%" rmdir /s /q "%PHP_BUILD_CACHE_SDK_DIR%"
19+
)
20+
1621
if not exist "%PHP_BUILD_CACHE_SDK_DIR%" (
1722
echo Cloning remote SDK repository
1823
git clone --branch %SDK_BRANCH% %SDK_REMOTE% "%PHP_BUILD_CACHE_SDK_DIR%" 2>&1
19-
) else (
24+
)
25+
26+
for /f "tokens=*" %%a in ('type %PHP_BUILD_CACHE_SDK_DIR%\VERSION') do set GOT_SDK_VER=%%a
27+
echo Got SDK version %GOT_SDK_VER%
28+
if NOT "%GOT_SDK_VER%" == "%PHP_BUILD_SDK_BRANCH:~8%" (
29+
echo Switching to the configured SDK version %SDK_BRANCH:~8%
2030
echo Fetching remote SDK repository
2131
git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" fetch --prune origin 2>&1
2232
echo Checkout SDK repository branch
2333
git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" checkout --force %SDK_BRANCH%
2434
)
2535

26-
set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat
2736
if not exist "%SDK_RUNNER%" (
2837
echo "%SDK_RUNNER%" doesn't exist
2938
exit /b 3

ext/opcache/Optimizer/zend_inference.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -3083,7 +3083,12 @@ static int zend_update_type_info(const zend_op_array *op_array,
30833083
}
30843084
j = zend_ssa_next_use(ssa_ops, ssa_ops[i].result_def, j);
30853085
}
3086-
UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
3086+
if ((tmp & MAY_BE_ARRAY) && (tmp & MAY_BE_ARRAY_KEY_ANY)) {
3087+
UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
3088+
} else {
3089+
/* invalid key type */
3090+
UPDATE_SSA_TYPE(t1, ssa_ops[i].op1_def);
3091+
}
30873092
COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
30883093
}
30893094
/* FETCH_LIST on a string behaves like FETCH_R on null */

ext/opcache/tests/ssa_bug_009.phpt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
Incorrect type inference
3+
--FILE--
4+
<?php
5+
class PHP_CodeCoverage
6+
{
7+
private function addUncoveredFilesFromWhitelist()
8+
{
9+
foreach ($uncoveredFiles as $uncoveredFile) {
10+
for ($i = 1; $i <= $lines; $i++) {
11+
$data[$uncoveredFile][$i] = PHP_CodeCoverage_Driver::LINE_NOT_EXECUTED;
12+
}
13+
}
14+
}
15+
}
16+
?>
17+
OK
18+
--EXPECT--
19+
OK

0 commit comments

Comments
 (0)