PHPUnit Segmentation fault

后端 未结 13 828
故里飘歌
故里飘歌 2020-12-28 14:56

When a PHPUnit test fails normally on my dev box (Linux Mint), it causes a \"Segmentation Fault\" on my Continous Integration box (Centos). Both machines are running the sam

13条回答
  •  佛祖请我去吃肉
    2020-12-28 15:37

    Next to what cweiske suggested, if upgrading PHP is not an option for you and you have problems to locate the source of the segfault, you can use a debugger to find out more.

    You can launch gdb this way to debug a PHPUnit session:

    gdb --args php /usr/bin/phpunit quiz_service_Test.php
    

    Then type in r to run the program and/or set environment variables first.

    set env MALLOC_CHECK_=3
    r
    

    You might also consider to install the debugging symbols for PHP on the system to get better results for debugging. gdb checks this on startup for you and leaves a notice how you can do so.

提交回复
热议问题