Skip to content

Getting typeinfo of non DISPATCH variant segfaults #16991

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

Closed
cmb69 opened this issue Nov 29, 2024 · 0 comments
Closed

Getting typeinfo of non DISPATCH variant segfaults #16991

cmb69 opened this issue Nov 29, 2024 · 0 comments

Comments

@cmb69
Copy link
Member

cmb69 commented Nov 29, 2024

Description

The following code:

<?php
com_print_typeinfo(new variant("hello"));

Resulted in this output:

segfault

But I expected this output instead:

Warning: com_print_typeinfo(): Unable to find typeinfo using the parameters supplied

PHP Version

PHP 8.2

Operating System

Windows

@cmb69 cmb69 self-assigned this Nov 29, 2024
@cmb69 cmb69 changed the title Getting typeinfo of non DISPATCH variant segfault Getting typeinfo of non DISPATCH variant segfaults Nov 29, 2024
cmb69 added a commit to cmb69/php-src that referenced this issue Nov 29, 2024
We must not assume that any `VARIANT` implements `IDispatch`.
cmb69 added a commit that referenced this issue Nov 29, 2024
* PHP-8.2:
  Fix GH-16991: Getting typeinfo of non DISPATCH variant segfaults
cmb69 added a commit that referenced this issue Nov 29, 2024
* PHP-8.3:
  Fix GH-16991: Getting typeinfo of non DISPATCH variant segfaults
@cmb69 cmb69 closed this as completed in 9bae893 Nov 29, 2024
cmb69 added a commit that referenced this issue Nov 29, 2024
* PHP-8.4:
  Fix GH-16991: Getting typeinfo of non DISPATCH variant segfaults
charmitro pushed a commit to wasix-org/php that referenced this issue Mar 13, 2025
We must not assume that any `VARIANT` implements `IDispatch`.

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

Successfully merging a pull request may close this issue.

1 participant