You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cloning a faked SplFileInfo object may segfault #7809
We have some code that worked without any issues on PHP 8.0, but it's failing with a segmentation fault on 8.1.
I'm not sure whether it's a PHPUnit or PHP issue... So please see the code. Mock creation triggers the problem.
I've opened sebastianbergmann/phpunit#4844 for PHPUnit, but the issue was closed with a piece of advice to report it to PHP. So please see the test repo for the details about the issue.
source->path is NULL, and zend_string_copy() can't handle that. Prior to 13e4ce3, there were no zend_strings but rather char*s so no problem with PHP 8.0.
Activity
7snovic commentedon Dec 22, 2021
the same on my local machine.
I am using the
ondrej/phpbuildverified on 8.2 too
cmb69 commentedon Dec 22, 2021
Relevant part of the stack backtrace:
The problem is at
php-src/ext/spl/spl_directory.c
Line 388 in 713dcb2
source->pathis NULL, andzend_string_copy()can't handle that. Prior to 13e4ce3, there were nozend_strings but ratherchar*s so no problem with PHP 8.0.cmb69 commentedon Dec 22, 2021
The following patch might do:
Fix phpGH-7809: Cloning a faked SplFileInfo object may segfault
[-]Segmentation fault @ PHP 8.1[/-][+]Cloning a faked SplFileInfo object may segfault[/+]Merge branch 'PHP-8.1'