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

THRIFT-4807: Fix php segfault on reference pass #1747

Merged
merged 1 commit into from Feb 22, 2019

Conversation

sokac
Copy link
Contributor

@sokac sokac commented Feb 21, 2019

Client: php (extension)

When reference is passed to php extension, it's unreferenced (instead of
derefrenced). The next time one tries to use the same variable PHP
segaults. Even if not used again, php segfaults on
user_shutdown_function_call.

Tested by rerunning code in Jira THRIFT-4807 with the patch - passes

Client: php (extension)

When reference is passed to php extension, it's unreferenced (instead of
derefrenced). The next time one tries to use the same variable PHP
segaults. Even if not used again, php segfaults on
user_shutdown_function_call.
@jeking3
Copy link
Contributor

jeking3 commented Feb 21, 2019

Would you be able to add the example as a test case?

@sokac
Copy link
Contributor Author

sokac commented Feb 21, 2019

It's very challenging as it requires classes defined in library, and not extension. Furthermore, as there are no tests for extension, I don't know does current setup allow compiling native extension and loading it up. It doesn't help I have no experience writing phpt tests, but seems straightforward.

Seems like a big project which I might be able to help with (I can file a Jira ticket for it) but I would suggest to be part of different PR.

Thoughts?

@jeking3 jeking3 merged commit a4ee1f2 into apache:master Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants