Skip to content

Disallow calls to abstract __call() / __callStatic() #17719

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

Merged
merged 3 commits into from
Feb 7, 2025

Conversation

TimWolla
Copy link
Member

@TimWolla TimWolla commented Feb 6, 2025

Fixes #17718

Copy link
Member

@arnaud-lb arnaud-lb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!

Comment on lines +1545 to +1546
zend_string_release_ex(fbc->common.function_name, 0);
zend_free_trampoline(fbc);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, but I think we need this below in the ZEND_ACC_TRAIT case when EG(exception) is set.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed:

php: php-src/Zend/zend_execute_API.c:489: void shutdown_executor(void): Assertion `(executor_globals.trampoline).common.function_name == ((void*)0) || (compiler_globals.unclean_shutdown)' failed.

I'll make a separate PR for that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TimWolla TimWolla merged commit 0607b66 into php:PHP-8.3 Feb 7, 2025
9 checks passed
TimWolla added a commit that referenced this pull request Feb 7, 2025
* PHP-8.3:
  Disallow calls to abstract `__call()` / `__callStatic()` (#17719)
TimWolla added a commit that referenced this pull request Feb 7, 2025
* PHP-8.4:
  Disallow calls to abstract `__call()` / `__callStatic()` (#17719)
@TimWolla TimWolla deleted the magic-call-inherit-abstract branch February 7, 2025 08:38
charmitro pushed a commit to wasix-org/php that referenced this pull request Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants