-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation Fault on stream #11735
Comments
@sf-cg Hopefully #11737 should solve the issue for you. In PHP 8.1, any opened user stream wrapper would leak until the end of the request. 8.2 fixes this by closing the user stream as soon as the last resource that uses it is closed. However, it was missed that in The use-after-free goes away with this patch, however the test still fails for me. Can you verify if the behavior is correct? |
@iluuu1994 that was much quicker than expected! Once I built your branch correctly (need to make sure it had curl, mbstring, xml and with openssl for php-vcr to competely work) it passed the tests fine. If the test failed fo you it may have been due to missing one of these as it was also giving the first test and error for me without them (and not recording/reading the cassette as PHP-VCR normally would) - I probably should have added those requirements to composer so it was easier to understand. |
I can also confirm using your branch of PHP works with the original project where we came across this issue. Thanks again for the quick response and fix 👍 I'm new to this, but if this is approved and merged how long before we could get a 8.2.9 version installed without having to build it ourselves? |
@sf-cg You're welcome! We just missed RC1 of 8.2.9 but I can ask for it to be cherry-picked. It should be released somewhere in the first half of next month. How fast it is available on your distro depends on the distro, but I think it's usually not long after. |
Description
The following code:
from the reproducible repo: https://github.com/sf-cg/php-8.2-segfault
When running php-vcr on PHP8.2 (any patch version, and even 8.3 alpha), the tests are resulting in a segfault. This does not happen on 8.1 or previous versions even when using the same php-vcr package.
Resulted in this output:
Segmentation fault
But I expected this output instead:
Tests to complete running successfully
gdb bt:
PHP Version
PHP 8.2
Operating System
Ubuntu 22.04
The text was updated successfully, but these errors were encountered: