-
Notifications
You must be signed in to change notification settings - Fork 337
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
Segfault on PHP8.3 with class type as a method parameter due to memory corruption #529
Comments
I can add that I've inspected
and then type_name->val is |
Ok after more trial/error it looks like its picking up memory from the next method... For example I changed it to:
When it crashes there |
Ok, now I'm super confused. I dug until I came across the code in
The output for this function registration ends up being.
I've dug into the ZEND_TYPE_INIT_CODE macro but so far haven't found a significant differences between it and 8.1. I don't see how the data isn't being copied into the zend_entry... |
This issue is fixed by #530 |
Hello,
We have an extension we've used for multiple years that is built against php-cpp. Recently we're looking at upgrading to php 8.3. We recompiled php-cpp and our extension and it all compiled cleanly. However php segfaults on startup. I've dug into the issue and have narrowed it down - however I've not been able to find the root cause. I'll include a full stacktrace at the end.
I narrowed it down to the following:
When I exclude these lines everything starts up fine.
I tried to create a simple reproducer by copying one of the Examples from PHP-CPP and creating a simple NamespacedObject but it didn't crash no matter what I did.
I copied over my pdfWriter object from my extension to the new Examples (commenting out a bunch of implementation code) Changing the
PDF\\PdfImage
toNonExisting\\Vendor\\NamespacedObject
<-- Doesn't existVendor\\NamespacedObject
<-- Simple php-cpp class with a few getters/constructor __toString etc.ArrayObject
<-- part of PHPPHP doesn't crash on startup for any of those three situations but continues to crash if I provide
PDF\\PdfImage
Here's the stack trace deep in PHP functions/macros.
Any pointers would be appreciated.
The text was updated successfully, but these errors were encountered: