Stdlib: lower ldap_set_option/ldap_get_option through JIT helper bridges (#32107) - #32142
Merged
Merged
Conversation
…ges (#32107) Reuse VmLdapNative int/bool option SSOT from NestedJIT helpers so JIT matches VM instead of throwing LogicException, including null LDAP handles and by-ref ldap_get_option out args. Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LogicExceptionforldap_set_option()/ldap_get_option(); lowering goes throughLdapLinkJitHelper+LdapRuntimebridges that reuseVmLdapNative::setOptionInt/getOptionInt(php-srcext/ldap/ldap.c).LDAP\Connection|null, int option, and the by-ref$retvalout-arg; int/bool value subset matches VM.php-src reference
PHP_FUNCTION(ldap_set_option),ldap_get_option)PHP implementation
ext/ldap/ldap_link_builtins.php—call()→JitLdapLink::invokeSetOption/invokeGetOptionext/ldap/JitLdapLink.php+ext/ldap/LdapLinkJitHelper.php— NestedJIT helperslib/JIT/Builtin/LdapRuntime.php—__compiler_ldap_set_option/__compiler_ldap_get_option/__compiler_ldap_get_option_valueTest plan
LdapSetGetOption*, related ldap helper tests)php script/bootstrap-inventory.php --check(7578/7578)./script/ci-fast.sh— not re-run here; AOTphpc buildof this repro hits the same pre-existing NestedJIT__compiler_sprintflink miss as already-merged Stdlib: ldap_errno()/ldap_error()/ldap_err2str() JIT lowering missing — VM path only (ext/ldap/ldap.c) #32106Verification
AOT
./phpc buildof this repro (and of already-merged #32106 errno repro) fails at link with undefined__compiler_sprintfinsideLdapLinkJitHelper::requireConnection— pre-existing NestedJIT AOT gap, not introduced here.Made with Cursor