Skip to content

Suppress arginfo / zpp mismatch via ZEND_SUPPRESS_ARGINFO_ZPP_MISMATCH #10424

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

Open
wants to merge 8 commits into
base: PHP-8.2
Choose a base branch
from

Conversation

zeriyoshi
Copy link
Contributor

@zeriyoshi zeriyoshi commented Jan 23, 2023

Currently, debug builds of PHP always detect an arginfo / zpp mismatch in shared extensions and raise a Fatal Error while running extensions that do not properly define arginfo. This is very inconvenient if you want to get a core dump while running an extension (e.g. protobuf, redis) that does not define arginfo properly.

To solve this problem, the environment variable ZEND_SUPPRESS_ARGINFO_ZPP_MISMATCH has been added to disable arginfo / zpp integrity checks even in debug builds when it is enabled.

In PHP 8.2, a change was made to disable detection of Fake Closure arginfo / zpp mismatches, a side effect of which is that arginfo / zpp integrity checks are no longer performed for extensions built into PHP itself. It appears that this change is aready unnecessary, so we will revert it at the same time.

Update: This is bug and fixed in #10417

In any case, this change affects only debug builds and does not affect normal builds.

Closes: #10451

@nielsdos
Copy link
Member

This seems kinda related to #10417, where I found that the check introduced in 8.2 wrongly disabled validation in that function by creating a condition which is always true.

@zeriyoshi zeriyoshi force-pushed the suppress_arginfo_zpp_mismatch branch 2 times, most recently from 84ab5c0 to 69e2cd4 Compare January 24, 2023 03:35
@zeriyoshi
Copy link
Contributor Author

@nielsdos
I am not familiar with Fake Closures, but apparently this PR solves the problem.
I'll rebase and push again when #10417 is merged :)

@zeriyoshi
Copy link
Contributor Author

#10445

@zeriyoshi zeriyoshi force-pushed the suppress_arginfo_zpp_mismatch branch from ed6897e to e836fee Compare January 26, 2023 01:30
@Girgias
Copy link
Member

Girgias commented Jan 26, 2023

@zeriyoshi is this still relevant with #10417 merged or not?

@zeriyoshi
Copy link
Contributor Author

@Girgias
It has already been merged and rebased so there are no conflicts

I am only concerned if this change is acceptable as a patch version change. Since it only affects debug builds, I don't see it as a problem...

@nikic
Copy link
Member

nikic commented Jan 29, 2023

I am only concerned if this change is acceptable as a patch version change. Since it only affects debug builds, I don't see it as a problem...

The patch is ABI-breaking, so definitely not acceptable in this form.

@zeriyoshi
Copy link
Contributor Author

@nikic
I see. Thank you very much.
I assume this change only affects debug builds and not the ABI of release builds, but should the ABI of debug builds also be guaranteed?

But I don't particularly want this change in PHP-8.2 branch, so I would like to make the same change for master. Is the ABI change acceptable in this case?

@iluuu1994
Copy link
Member

@zeriyoshi The ABI break would definitely be acceptable for master.

@zeriyoshi
Copy link
Contributor Author

@iluuu1994
If this PR is properly rebuilt for the master, is there any chance it could be incorporated? If so, I would be happy to resume work!

@iluuu1994
Copy link
Member

@zeriyoshi Sure! Should be fine for master.

@zeriyoshi
Copy link
Contributor Author

Thanks! I rework it.

@iluuu1994
Copy link
Member

@zeriyoshi Would you still like to merge this? In that case, please rebase and target master.

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.

5 participants