1. <small id='nKcEZ'></small><noframes id='nKcEZ'>

      • <bdo id='nKcEZ'></bdo><ul id='nKcEZ'></ul>

      <legend id='nKcEZ'><style id='nKcEZ'><dir id='nKcEZ'><q id='nKcEZ'></q></dir></style></legend>
      <tfoot id='nKcEZ'></tfoot>

      <i id='nKcEZ'><tr id='nKcEZ'><dt id='nKcEZ'><q id='nKcEZ'><span id='nKcEZ'><b id='nKcEZ'><form id='nKcEZ'><ins id='nKcEZ'></ins><ul id='nKcEZ'></ul><sub id='nKcEZ'></sub></form><legend id='nKcEZ'></legend><bdo id='nKcEZ'><pre id='nKcEZ'><center id='nKcEZ'></center></pre></bdo></b><th id='nKcEZ'></th></span></q></dt></tr></i><div id='nKcEZ'><tfoot id='nKcEZ'></tfoot><dl id='nKcEZ'><fieldset id='nKcEZ'></fieldset></dl></div>

      如何诊断这些 PHP-Code-Coverage 分段和 zend_mm_heap 损坏的错误

      时间:2024-04-13
          <tbody id='8UlR8'></tbody>

        <small id='8UlR8'></small><noframes id='8UlR8'>

        <legend id='8UlR8'><style id='8UlR8'><dir id='8UlR8'><q id='8UlR8'></q></dir></style></legend>
          1. <i id='8UlR8'><tr id='8UlR8'><dt id='8UlR8'><q id='8UlR8'><span id='8UlR8'><b id='8UlR8'><form id='8UlR8'><ins id='8UlR8'></ins><ul id='8UlR8'></ul><sub id='8UlR8'></sub></form><legend id='8UlR8'></legend><bdo id='8UlR8'><pre id='8UlR8'><center id='8UlR8'></center></pre></bdo></b><th id='8UlR8'></th></span></q></dt></tr></i><div id='8UlR8'><tfoot id='8UlR8'></tfoot><dl id='8UlR8'><fieldset id='8UlR8'></fieldset></dl></div>
          2. <tfoot id='8UlR8'></tfoot>
              <bdo id='8UlR8'></bdo><ul id='8UlR8'></ul>

              • 本文介绍了如何诊断这些 PHP-Code-Coverage 分段和 zend_mm_heap 损坏的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我一直在我的 Ubuntu 机器上愉快地编写代码.这是一台具有大量 RAM 的强大机器.我正在研究 4 个新课程,边写边写和运行单元测试.在某些时候我注意到,虽然单元测试完成得很好,但代码覆盖率却没有.

                I have been happily coding away on my Ubuntu machine. It's a beefy machine with plenty of RAM. I was working on 4 new classes, writing and running unit tests as I go. At some point I noticed that, while the unit tests were completing fine, code coverage was not.

                在正在生成代码覆盖率报告……等等"消息之后,我会收到一条消息说 zend_mm_heap 已损坏.我尝试了一些修复,包括:在我的 php.ini(apache2 和 cli)中设置 output_buffering = On,并从我的代码中删除对 unset() 的调用.(我阅读了这些可能需要修复的内容).

                After the message "Generating code coverage report...etc.." I would get a message saying zend_mm_heap corrupted. I tried a few fixes including: setting output_buffering = On in my php.ini (both apache2 and cli), and removing calls to unset() from my code. (I read on SO these fixed might be required).

                现在,无论我做什么,我似乎都在 zend_mm... 错误和分段错误(核心转储)错误之间交替出现.我注释掉测试,直到我缩小我认为导致问题的那个,并在那里进行一些更改,直到我得到一个干净的运行.然后我将取消所有测试的注释,只是发现仍然出现该故障.

                Now, I seem to alternate between the zend_mm... error, and a Segmentation fault (core dump) error, no matter what I do. I comment out tests until I narrow down the one that I think causes the problem, and make some changes there until I get a clean run. Then I'll uncomment all the test only to find the that fault still occurs.

                有什么想法吗?我可以使用哪些工具或方法来收集更多信息?

                Any ideas? What tools or method could I use to gather more info?

                我正在使用 PHP_CodeCoverage 1.2.6、PHP 5.3.10-1ubuntu3.5、PHPUnit 3.7.9.

                I am using PHP_CodeCoverage 1.2.6, PHP 5.3.10-1ubuntu3.5, PHPUnit 3.7.9.

                顺便说一句,我找不到任何核心转储文件.从我的两个物理磁盘的根目录中搜索,但没有运气.我已阅读有关核心的 man 条目,包括核心转储未创建文件的可能原因,但我认为这些都不适用.

                As an aside, I can't find any core dump files. Have searched from the root of both my physical disks with no luck. I have read the man entry on core, including the possible reasons for core dumps not creating a file, but I don't think any of those apply.

                推荐答案

                我最近遇到了同样的问题.这似乎是 PHP 垃圾收集的问题.在 phpunit 运行期间禁用垃圾收集解决了我的问题.

                I had the same issue recently. It appears to be an issue with PHP garbage collection. Disabling garbage collection during phpunit runs solved the problem to me.

                添加:

                zend.enable_gc=0 
                

                到您的 php.ini 文件或从命令行使用:

                to your php.ini file or from the command line with:

                phpunit -d zend.enable_gc=0
                

                这篇关于如何诊断这些 PHP-Code-Coverage 分段和 zend_mm_heap 损坏的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:如何阻止 PHP 中的无限递归函数吃掉所有可用内存并最终导致笔记本电脑崩溃? 下一篇:PHPUnit分段错误11

                相关文章

              • <small id='WFPcI'></small><noframes id='WFPcI'>

                  <bdo id='WFPcI'></bdo><ul id='WFPcI'></ul>

                    <tfoot id='WFPcI'></tfoot>
                    <legend id='WFPcI'><style id='WFPcI'><dir id='WFPcI'><q id='WFPcI'></q></dir></style></legend>
                    <i id='WFPcI'><tr id='WFPcI'><dt id='WFPcI'><q id='WFPcI'><span id='WFPcI'><b id='WFPcI'><form id='WFPcI'><ins id='WFPcI'></ins><ul id='WFPcI'></ul><sub id='WFPcI'></sub></form><legend id='WFPcI'></legend><bdo id='WFPcI'><pre id='WFPcI'><center id='WFPcI'></center></pre></bdo></b><th id='WFPcI'></th></span></q></dt></tr></i><div id='WFPcI'><tfoot id='WFPcI'></tfoot><dl id='WFPcI'><fieldset id='WFPcI'></fieldset></dl></div>