Skip to content
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

Fix memory corruption #530

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gnat42
Copy link
Contributor

@gnat42 gnat42 commented May 1, 2024

When initializing a function parameter that takes a class as an argument in some situations the name of the class is incorrect and points to other memory. Thus we copy the class name into its own zend_string first.

@gnat42
Copy link
Contributor Author

gnat42 commented May 2, 2024

I don't expect this to be merged as quickly as the last MR I sent in. However, just in case, don't merge this yet. Everything seems to work properly except for when trying to use Reflection on these classes. I'm investigating the root cause of that now.

@gnat42
Copy link
Contributor Author

gnat42 commented May 2, 2024

I think this is safe to merge. The crash I'm seeing also happens with PHP 8.1 and I've isolated the issue and will file an issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant