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

ZPP: add F type check for callables that do not free trampolines #12375

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Oct 6, 2023

This would simplify the implementation of #12340 by quite a bit.

Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

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

This is an improvement in my opinion as discussed earlier.
Looks sensible to me if benchmarking has no regressions and if Dmitry finds it ok too.

@Girgias Girgias force-pushed the zpp-F-no-free-trampolines branch from 47eadcf to bee31be Compare October 7, 2023 13:42
@dstogov
Copy link
Member

dstogov commented Oct 9, 2023

I didn't check this carefully and I see some tests failures, but I like the idea.

Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

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

Looks ok in its current form.
May need a short entry in upgrading.internals too?

@Girgias Girgias force-pushed the zpp-F-no-free-trampolines branch from 77007f1 to 928faec Compare October 9, 2023 22:50
@Girgias Girgias force-pushed the zpp-F-no-free-trampolines branch from 14056cb to c8a2bb2 Compare October 10, 2023 00:49
@Girgias Girgias merged commit e41598c into php:master Oct 10, 2023
7 of 9 checks passed
@Girgias Girgias deleted the zpp-F-no-free-trampolines branch October 10, 2023 12:44
@@ -1794,9 +1794,9 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
Z_PARAM_DOUBLE_EX(dest, is_null, 1, 0)

/* old "f" */
#define Z_PARAM_FUNC_EX(dest_fci, dest_fcc, check_null, deref) \
#define Z_PARAM_FUNC_EX(dest_fci, dest_fcc, check_null, deref, free_trampoline) \
Copy link
Member

Choose a reason for hiding this comment

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

This may break third-party extensions.

e.g. pecl/memcached https://github.com/dstogov/php-src/actions/runs/6483064666/job/17603831990

I think it's better to keep Z_PARAM_FUNC_EX unchanged and add Z_PARAM_FUNC_EX2.

cc: @iluuu1994 @nielsdos

Copy link
Member

Choose a reason for hiding this comment

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

I'm on it: #12419

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