Edit report at https://bugs.php.net/bug.php?id=81612&edit=1
ID: 81612
Updated by: patrickallaert@php.net
Reported by: bartos dot developer152 at gmail dot com
Summary: Segmentation fault on PHP 8.1 with pcov
-Status: Open
+Status: Closed
Type: Bug
Package: Reproducible crash
Operating System: Ubuntu 20.04.3
PHP Version: 8.1Git-2021-11-11 (Git)
-Assigned To:
+Assigned To: patrickallaert
Block user comment: N
Private report: N
New Comment:
This is a pcov bug, not a PHP one.
It has been fixed in pcov.
Thanks for your report.
Previous Comments:
------------------------------------------------------------------------
[2021-11-12 11:44:20] nikic@php.net
https://github.com/krakjoe/pcov/pull/75 fixes
the issue for me.
------------------------------------------------------------------------
[2021-11-12 11:16:42] nikic@php.net
Testing with pcov now, I see this valgrind warning:
==1363300== Invalid read of size 4
==1363300== at 0x8535BA: zend_string_release (zend_string.h:319)
==1363300== by 0x853AB4: zm_deactivate_filestat (filestat.c:91)
==1363300== by 0x828BFB: zm_deactivate_basic (basic_functions.c:541)
==1363300== by 0xA3AF67: zend_deactivate_modules (zend_API.c:3016)
==1363300== by 0x98B198: php_request_shutdown (main.c:1823)
==1363300== by 0xB9FE2A: do_cli (php_cli.c:1135)
==1363300== by 0xBA06FF: main (php_cli.c:1367)
==1363300== Address 0xbc7b2b4 is 4 bytes inside a block of size 91 free'd
==1363300== at 0x483CA3F: free (in
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==1363300== by 0x66632B: php_pcov_filename_dtor (pcov.c:345)
==1363300== by 0xA47E82: zend_hash_destroy (zend_hash.c:1590)
==1363300== by 0x666952: zm_deactivate_pcov (pcov.c:493)
==1363300== by 0xA3AF67: zend_deactivate_modules (zend_API.c:3016)
==1363300== by 0x98B198: php_request_shutdown (main.c:1823)
==1363300== by 0xB9FE2A: do_cli (php_cli.c:1135)
==1363300== by 0xBA06FF: main (php_cli.c:1367)
==1363300== Block was alloc'd at
==1363300== at 0x483DD99: calloc (in
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==1363300== by 0x665E91: php_pcov_interned_string (pcov.c:210)
==1363300== by 0x665F21: php_pcov_create (pcov.c:232)
==1363300== by 0x6660D1: php_pcov_trace (pcov.c:270)
==1363300== by 0x66625D: php_pcov_execute_ex (pcov.c:323)
==1363300== by 0xA6B99A: ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:1728)
==1363300== by 0xAE4218: zend_vm_call_opcode_handler (zend_vm_execute.h:62999)
==1363300== by 0x666117: php_pcov_trace (pcov.c:282)
==1363300== by 0x66625D: php_pcov_execute_ex (pcov.c:323)
==1363300== by 0xA6BDE1: ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:1837)
==1363300== by 0xAE4218: zend_vm_call_opcode_handler (zend_vm_execute.h:62999)
==1363300== by 0x666117: php_pcov_trace (pcov.c:282)
------------------------------------------------------------------------
[2021-11-12 11:05:21] bartos dot developer152 at gmail dot com
nikic@php.net:
That's it! Thank you, I had no idea it could be caused by pcov.
https://github.com/orisai/nette-console/runs/4188901103?check_suite_focus=true#step:13:99
------------------------------------------------------------------------
[2021-11-12 11:01:12] nikic@php.net
Would it be possible to test with pcov not enabled? Looking at the bug tracker there, https://github.com/krakjoe/pcov/issues/73 seems
to indicate that there may be a compatibility issue between pcov and PHP 8.1.
------------------------------------------------------------------------
[2021-11-12 10:55:23] bartos dot developer152 at gmail dot com
Danack at basereality dot com:
Thank you it seems to work now. Unfortunately it added only this to output
> [Inferior 1 (process 3171) exited with code 02]> No stack.https://github.com/orisai/nette-console/runs/4188618661?check_suite_focus=true#step:13:117
nikic@php.net:
My full command was this, hopefully it will be helpful
XDEBUG_MODE=off php -d pcov.enabled=1 -d pcov.directory=./src "vendor/bin/paratest" -c
tools/phpunit.xml --runner=WrapperRunner -p16 --coverage-clover=var/coverage/clover.xml
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=81612
--
Edit this bug report at https://bugs.php.net/bug.php?id=81612&edit=1