Permalink
Browse files

Merged pull request #430

  • Loading branch information...
derickr committed Sep 20, 2018
2 parents 6cda94f + fe297c2 commit c99573028e413ab74cd704d7c66307889c7b25d3
View
@@ -13,6 +13,11 @@ environment:
SDK_BRANCH: php-sdk-2.1.1
matrix:
- PHP_REL: 7.3
ARCHITECTURE: x64
ZTS_STATE: enable
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PHP_BUILD_CRT: vc15
- PHP_REL: 7.2
ARCHITECTURE: x64
ZTS_STATE: enable
@@ -28,6 +33,11 @@ environment:
ZTS_STATE: enable
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
PHP_BUILD_CRT: vc14
- PHP_REL: 7.3
ARCHITECTURE: x64
ZTS_STATE: disable
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PHP_BUILD_CRT: vc15
- PHP_REL: 7.2
ARCHITECTURE: x64
ZTS_STATE: disable
View
@@ -6,6 +6,7 @@ php:
- 7.0
- 7.1
- 7.2
- 7.3
- nightly
matrix:
View
@@ -166,9 +166,10 @@ ZEND_BEGIN_MODULE_GLOBALS(xdebug)
zend_long halt_level;
zend_long overload_var_dump;
void (*orig_var_dump_func)(INTERNAL_FUNCTION_PARAMETERS);
void (*orig_set_time_limit_func)(INTERNAL_FUNCTION_PARAMETERS);
void (*orig_pcntl_exec_func)(INTERNAL_FUNCTION_PARAMETERS);
zif_handler orig_var_dump_func;
zif_handler orig_set_time_limit_func;
zif_handler orig_pcntl_exec_func;
xdebug_trace_handler_t *trace_handler;
void *trace_context;
@@ -190,7 +191,7 @@ ZEND_BEGIN_MODULE_GLOBALS(xdebug)
zend_long display_max_data;
zend_long display_max_depth;
zend_bool cli_color;
zend_long cli_color;
int output_is_tty;
/* used for code coverage */
View
@@ -30,16 +30,16 @@ echo "And going and going...\n";
?>
DONE
--EXPECTF--
TypeError: Argument 1 passed to B::myMethod() must be an instance of A, integer given, called in %sbug00391-php7.php on line 17 in %sbug00391-php7.php on line 10
TypeError: Argument 1 passed to B::myMethod() must be an instance of A, int%S given, called in %sbug00391-php7.php on line 17 in %sbug00391-php7.php on line 10
Call Stack:
%w%f%w%d 1. {main}() %sbug00391-php7.php:0
%w%f%w%d 2. B->myMethod() %sbug00391-php7.php:17
Fatal error: Uncaught TypeError: Argument 1 passed to B::myMethod() must be an instance of A, integer given, called in %sbug00391-php7.php on line 17 and defined in %sbug00391-php7.php on line 10
Fatal error: Uncaught TypeError: Argument 1 passed to B::myMethod() must be an instance of A, int%S given, called in %sbug00391-php7.php on line 17 and defined in %sbug00391-php7.php on line 10
TypeError: Argument 1 passed to B::myMethod() must be an instance of A, integer given, called in %sbug00391-php7.php on line 17 in %sbug00391-php7.php on line 10
TypeError: Argument 1 passed to B::myMethod() must be an instance of A, int%S given, called in %sbug00391-php7.php on line 17 in %sbug00391-php7.php on line 10
Call Stack:
%w%f%w%d 1. {main}() %sbug00391-php7.php:0
@@ -18,6 +18,6 @@ function func(){
func();
?>
--EXPECT--
a: (refcount=0, is_ref=0)='hoge'
a: (refcount=0, is_ref=0)='hoge'(29)
--EXPECTF--
a: (refcount=%d, is_ref=0)='hoge'
a: (refcount=%d, is_ref=0)='hoge'(29)
@@ -18,5 +18,5 @@ function func(){
func();
?>
--EXPECTF--
a: (refcount=%r(2|0)%r, is_ref=0)='hoge'
a: (refcount=%r(2|0)%r, is_ref=0)='hoge'(29)
a: (refcount=%d, is_ref=0)='hoge'
a: (refcount=%d, is_ref=0)='hoge'(29)
View
@@ -41,7 +41,7 @@ new ArrayObject("fasdfdsaf", "fasdf", "fasdf");
<br />
<font size='1'><table class='xdebug-error xe-uncaught-exception' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Fatal error: Uncaught%sin %sbug00811.php on line <i>9</i></th></tr>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> %s: ArrayObject::__construct() expects parameter 2 to be %r(long|integer)%r, string given in %sbug00811.php on line <i>9</i></th></tr>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> %s: ArrayObject::__construct() expects parameter 2 to be %r(long|integer|int)%r, string given in %sbug00811.php on line <i>9</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug00811.php' bgcolor='#eeeeec'>...%sbug00811.php<b>:</b>0</td></tr>
@@ -1,7 +1,8 @@
--TEST--
Test for bug #1034: path coverage [1] (> PHP 7.1, opcache)
Test for bug #1034: path coverage [1] (> PHP 7.1, < PHP 7.3, opcache)
--SKIPIF--
<?php if (!version_compare(phpversion(), "7.1", '>')) echo "skip > PHP 7.1 needed\n"; ?>
<?php if (!version_compare(phpversion(), "7.1", '>')) echo "skip > PHP 7.1, < PHP 7.3 needed\n"; ?>
<?php if (!version_compare(phpversion(), "7.3", '<')) echo "skip > PHP 7.1, < PHP 7.3 needed\n"; ?>
<?php if (!extension_loaded('zend opcache')) echo "skip opcache required\n"; ?>
--FILE--
<?php
@@ -1,7 +1,8 @@
--TEST--
Test for bug #1034: path coverage [1] (> PHP 7.0.12)
Test for bug #1034: path coverage [1] (> PHP 7.0.12, < PHP 7.3)
--SKIPIF--
<?php if (!version_compare(phpversion(), "7.0.12", '>')) echo "skip > PHP 7.0.12 needed\n"; ?>
<?php if (!version_compare(phpversion(), "7.0.12", '>')) echo "skip > PHP 7.0.12, < PHP 7.3 needed\n"; ?>
<?php if (!version_compare(phpversion(), "7.3", '<')) echo "skip > PHP 7.0.12, < PHP 7.3 needed\n"; ?>
<?php if (extension_loaded('zend opcache')) echo "skip opcache should not be loaded\n"; ?>
--FILE--
<?php
@@ -0,0 +1,58 @@
--TEST--
Test for bug #1034: path coverage [1] (> PHP 7.1, < PHP 7.3, opcache)
--XFAIL--
Bug #1519: PHP 7.3 support — CATCH is done differently and code coverage goes wrong
--SKIPIF--
<?php if (!version_compare(phpversion(), "7.1", '>')) echo "skip > PHP 7.1, < PHP 7.3 needed\n"; ?>
<?php if (!version_compare(phpversion(), "7.3", '<')) echo "skip > PHP 7.1, < PHP 7.3 needed\n"; ?>
<?php if (!extension_loaded('zend opcache')) echo "skip opcache required\n"; ?>
--FILE--
<?php
include 'dump-branch-coverage.inc';
xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE | XDEBUG_CC_BRANCH_CHECK);
include 'bug01034-001.inc';
xdebug_stop_code_coverage(false);
$c = xdebug_get_code_coverage();
dump_branch_coverage($c);
?>
--EXPECTF--
0 1 2 3
!42
caught
ifelse
- branches
- 00; OP: 00-04; line: 10-12 HIT; out1: 05 X ; out2: 08 HIT
- 05; OP: 05-07; line: 13-13 X ; out1: 12 X
- 08; OP: 08-11; line: 15-16 HIT; out1: EX X
- 12; OP: 12-15; line: 18-19 X ; out1: EX X
- paths
- 0 5 12: X
- 0 8: HIT
loopy
- branches
- 00; OP: 00-04; line: 02-04 HIT; out1: 10 HIT
- 05; OP: 05-09; line: 05-04 HIT; out1: 10 HIT
- 10; OP: 10-12; line: 04-04 HIT; out1: 13 HIT; out2: 05 HIT
- 13; OP: 13-16; line: 07-08 HIT; out1: EX X
- paths
- 0 10 13: HIT
- 0 10 5 10 13: HIT
trycatch
- branches
- 00; OP: 00-07; line: 21-24 HIT; out1: EX X
- 08; OP: 08-08; line: 26-26 HIT; out1: 09 HIT; out2: EX X
- 09; OP: 09-12; line: 27-29 HIT; out1: EX X
- paths
- 0: HIT
- 8 9: HIT
{main}
- branches
- 00; OP: 00-26; line: 02-36 HIT; out1: EX X
- paths
- 0: HIT
@@ -0,0 +1,57 @@
--TEST--
Test for bug #1034: path coverage [1] (>= PHP 7.3)
--XFAIL--
Bug #1519: PHP 7.3 support — CATCH is done differently and code coverage goes wrong
--SKIPIF--
<?php if (!version_compare(phpversion(), "7.3", '>=')) echo "skip >= PHP 7.3\n"; ?>
<?php if (extension_loaded('zend opcache')) echo "skip opcache should not be loaded\n"; ?>
--FILE--
<?php
include 'dump-branch-coverage.inc';
xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE | XDEBUG_CC_BRANCH_CHECK);
include 'bug01034-001.inc';
xdebug_stop_code_coverage(false);
$c = xdebug_get_code_coverage();
dump_branch_coverage($c);
?>
--EXPECTF--
0 1 2 3
!42
caught
ifelse
- branches
- 00; OP: 00-04; line: 10-12 HIT; out1: 05 X ; out2: 08 HIT
- 05; OP: 05-07; line: 13-13 X ; out1: 12 X
- 08; OP: 08-11; line: 15-16 HIT; out1: EX X
- 12; OP: 12-15; line: 18-19 X ; out1: EX X
- paths
- 0 5 12: X
- 0 8: HIT
loopy
- branches
- 00; OP: 00-04; line: 02-04 HIT; out1: 11 HIT
- 05; OP: 05-10; line: 05-04 HIT; out1: 11 HIT
- 11; OP: 11-13; line: 04-04 HIT; out1: 14 HIT; out2: 05 HIT
- 14; OP: 14-17; line: 07-08 HIT; out1: EX X
- paths
- 0 11 14: HIT
- 0 11 5 11 14: HIT
trycatch
- branches
- 00; OP: 00-08; line: 21-24 HIT; out1: EX X
- 12; OP: 12-12; line: 26-26 HIT; out1: 13 HIT; out2: EX X
- 13; OP: 13-16; line: 27-29 HIT; out1: EX X
- paths
- 0: HIT
- 12 13: HIT
{main}
- branches
- 00; OP: 00-29; line: 02-36 HIT; out1: EX X
- paths
- 0: HIT
@@ -1,7 +1,8 @@
--TEST--
Test for bug #1034: path coverage [3] (> PHP 7.0.12)
Test for bug #1034: path coverage [3] (> PHP 7.0.12, < PHP 7.3)
--SKIPIF--
<?php if (!version_compare(phpversion(), "7.0.12", '>')) echo "skip > PHP 7.0.12 needed\n"; ?>
<?php if (!version_compare(phpversion(), "7.0.12", '>')) echo "skip > PHP 7.0.12, < PHP 7.3 needed\n"; ?>
<?php if (!version_compare(phpversion(), "7.3", '<')) echo "skip > PHP 7.0.12, < PHP 7.3 needed\n"; ?>
<?php if (extension_loaded('zend opcache')) echo "skip opcache should not be loaded\n"; ?>
--FILE--
<?php
@@ -0,0 +1,61 @@
--TEST--
Test for bug #1034: path coverage [3] (> PHP 7.1, opcache)
--XFAIL--
Bug #1519: PHP 7.3 support — CATCH is done differently and code coverage goes wrong
--SKIPIF--
<?php if (!version_compare(phpversion(), "7.1", '>')) echo "skip > PHP 7.1 needed\n"; ?>
<?php if (!extension_loaded('zend opcache')) echo "skip opcache required\n"; ?>
--FILE--
<?php
include 'dump-branch-coverage.inc';
xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE | XDEBUG_CC_BRANCH_CHECK);
include 'bug01034-003.inc';
xdebug_stop_code_coverage(false);
$c = xdebug_get_code_coverage();
dump_branch_coverage($c);
?>
--EXPECTF--
Let's do some stuff!
caught
And do some more
Let's do some stuff!
caught
And do some more
Let's do some stuff!
CAUGHT IN MAIN
trycatch
- branches
- 00; OP: 00-15; line: 06-13 HIT; out1: 16 HIT; out2: 20 HIT
- 16; OP: 16-17; line: 14-14 HIT; out1: 18 HIT; out2: 27 HIT
- 18; OP: 18-19; line: 15-15 HIT; out1: 41 X ; out2: 34 HIT
- 20; OP: 20-26; line: 13-13 HIT; out1: EX X
- 27; OP: 27-33; line: 14-14 HIT; out1: EX X
- 34; OP: 34-40; line: 15-15 HIT; out1: EX X
- 41; OP: 41-43; line: 17-17 X ; out1: 55 X
- 44; OP: 44-44; line: 18-18 HIT; out1: 45 HIT; out2: 48 HIT
- 45; OP: 45-47; line: 19-19 HIT; out1: 55 HIT
- 48; OP: 48-48; line: 20-20 HIT; out1: 49 X ; out2: 52 HIT
- 49; OP: 49-51; line: 21-21 X ; out1: 55 X
- 52; OP: 52-52; line: 22-22 HIT; out1: 53 HIT; out2: EX X
- 53; OP: 53-54; line: 23-26 HIT; out1: 55 HIT
- 55; OP: 55-58; line: 26-27 HIT; out1: EX X
- paths
- 0 16 18 41 55: X
- 0 16 18 34: HIT
- 0 16 27: HIT
- 0 20: HIT
- 44 45 55: HIT
- 44 48 49 55: X
- 44 48 52 53 55: HIT
{main}
- branches
- 00; OP: 00-28; line: 02-37 HIT; out1: EX X
- 29; OP: 29-29; line: 33-33 HIT; out1: 30 HIT; out2: EX X
- 30; OP: 30-32; line: 34-37 HIT; out1: EX X
- paths
- 0: HIT
- 29 30: HIT
@@ -0,0 +1,63 @@
--TEST--
Test for bug #1034: path coverage [3] (>= PHP 7.3)
--XFAIL--
Bug #1519: PHP 7.3 support — CATCH is done differently and code coverage goes wrong
--SKIPIF--
<?php if (!version_compare(phpversion(), "7.3", '>=')) echo "skip >= PHP 7.3\n"; ?>
<?php if (extension_loaded('zend opcache')) echo "skip opcache should not be loaded\n"; ?>
--FILE--
<?php
include 'dump-branch-coverage.inc';
xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE | XDEBUG_CC_BRANCH_CHECK);
include 'bug01034-003.inc';
xdebug_stop_code_coverage(false);
$c = xdebug_get_code_coverage();
dump_branch_coverage($c);
?>
--EXPECTF--
Let's do some stuff!
caught
And do some more
Let's do some stuff!
caught
And do some more
Let's do some stuff!
CAUGHT IN MAIN
trycatch
- branches
- 00; OP: 00-16; line: 06-13 HIT; out1: 17 HIT; out2: 22 HIT
- 17; OP: 17-18; line: 14-14 HIT; out1: 19 HIT; out2: 29 HIT
- 19; OP: 19-20; line: 15-15 HIT; out1: 21 X ; out2: 36 HIT
- 21; OP: 21-21; line: 15-15 X ; out1: 43 X
- 22; OP: 22-28; line: 13-13 HIT; out1: EX X
- 29; OP: 29-35; line: 14-14 HIT; out1: EX X
- 36; OP: 36-42; line: 15-15 HIT; out1: EX X
- 43; OP: 43-45; line: 17-17 X ; out1: 57 X
- 46; OP: 46-46; line: 18-18 HIT; out1: 47 HIT; out2: 50 HIT
- 47; OP: 47-49; line: 19-19 HIT; out1: 57 HIT
- 50; OP: 50-50; line: 20-20 HIT; out1: 51 X ; out2: 54 HIT
- 51; OP: 51-53; line: 21-21 X ; out1: 57 X
- 54; OP: 54-54; line: 22-22 HIT; out1: 55 HIT; out2: EX X
- 55; OP: 55-56; line: 23-26 HIT; out1: 57 HIT
- 57; OP: 57-60; line: 26-27 HIT; out1: EX X
- paths
- 0 17 19 21 43 57: X
- 0 17 19 36: HIT
- 0 17 29: HIT
- 0 22: HIT
- 46 47 57: HIT
- 46 50 51 57: X
- 46 50 54 55 57: HIT
{main}
- branches
- 00; OP: 00-30; line: 02-32 HIT; out1: 34 X
- 31; OP: 31-31; line: 33-33 HIT; out1: 32 HIT; out2: EX X
- 32; OP: 32-33; line: 34-37 HIT; out1: 34 HIT
- 34; OP: 34-34; line: 37-37 HIT; out1: EX X
- paths
- 0 34: X
- 31 32 34: HIT
View
@@ -0,0 +1,8 @@
<?php
foreach (['a'] as $item) {
if (false) {
echo "Test\n";
echo "Test\n";
}
}
?>
Oops, something went wrong.

0 comments on commit c995730

Please sign in to comment.