我遵循的是https://xdebug.org/docs/install准则
当我在MAC 2中运行sudo make test时,将根据项目需要安装PHP5 & PHP7版本。
PHP : /usr/local/php5/bin/php
PHP_SAPI : cli
PHP_VERSION : 7.2.7它给出以下误差
=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
Test for bug #1530: Code coverage incorrect for last code line in a loop [tests/bug01530.phpt] XFAIL REASON: PHP bug #76046: PHP generates "FE_FREE" opcode on the wrong line.
=====================================================================
You may have found a problem in PHP.
This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it. You can then email it to qa-reports@lists.php.net later.
Do you want to send this report now? [Yns]: 我试了2-3次,但同样的问题也发生了。
发布于 2018-12-31 04:09:32
测试失败的原因显而易见:
XFAIL原因: PHP #76046:PHP在错误的行上生成"FE_FREE“操作码。
您需要在PHP源代码中修补zend_compile.c (或等待固定版本)。如果不对zend_compile.c测试覆盖结果进行修补,可能会不准确--但是,普通的调试应该可以工作。当make test不部分依赖它时,xdebug不会检查它(测试的标题甚至明确说明了它检查bug的原因)。这是比较,它添加了CG(zend_lineno) = ast->lineno;。这“百分之百地解决了问题”,而不仅仅是症状:
index f1dd49a..9c0893b 100644 (file)
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -4807,6 +4807,7 @@ void zend_compile_foreach(zend_ast *ast) /* {{{ */
zend_end_loop(opnum_fetch, &reset_node);
+ CG(zend_lineno) = ast->lineno;
opline = zend_emit_op(NULL, ZEND_FE_FREE, &reset_node, NULL);
}
/* }}} */此bug影响PHP7.0、7.1、7.2 - PHP 5.x至少没有报告。由于这不是一个xdebug错误,即使在失败的测试中安装也不会使情况比现在更糟。要安装xdebug,它不是sudo make test,而是make && sudo make install (只有make install需要sudo)。
https://stackoverflow.com/questions/53443241
复制相似问题