Hash: scaffold standalone AOT __compiler_hash bridges (#3357)#17897
Open
PurHur wants to merge 3 commits into
Open
Hash: scaffold standalone AOT __compiler_hash bridges (#3357)#17897PurHur wants to merge 3 commits into
PurHur wants to merge 3 commits into
Conversation
Wire StringHashCrypto into user-script minimal standalone init and route PHP_COMPILER_AOT_USER_SCRIPT builds through JitVmHelperLink bridges instead of nested HashCryptoJitHelper JIT during user compile. Remaining: helper bridge returns null digest at AOT execute — hash_raw_output and hash_context_incremental fixtures still empty (VM/JIT green). Co-authored-by: Cursor <cursoragent@cursor.com>
Closed
6 tasks
…ers (#3357) Stop using JitVmHelperLink cached-unit bridges for user-script AOT (unit __init__ skipped under #16075). Detect PHP bridge entry blocks by name so stale LLVM bridge stubs are not treated as complete. AOT hash_raw_output still red — __compiler_hash returns null at execute; next step is replacing orphan LLVM entry blocks or a thin libc digest path. Co-authored-by: Cursor <cursoragent@cursor.com>
Owner
Author
|
Progress update (2026-07-11):
Still red: ./script/phpunit.sh --filter 'hash_raw_output|hash_context_incremental'
# hash_raw_output: 0/0 (hash returns false)
# hash_context_incremental: empty stdoutLikely next step: when a stale |
Delegate digest helpers to VmHashNative directly (php-src ext/hash parity). Document AOT blocker: nested JIT of HashCryptoJitHelper emits null digest because VmHashNative::hash is not lowered; VmHashNative precompile segfaults LLVM. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 11, 2026
Owner
Author
|
Maintainer triage 2026-07-12: not merge-ready — PR body documents AOT digest still empty ( |
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
Scaffolds the missing standalone-AOT path for
hash()/hash_hmac()/ incrementalhash_final()digest emission (#3357).Root cause (diagnosed):
__compiler_hashABI stubs fromlib/JIT/Builtin/Type.phpnever received bodies duringPHP_COMPILER_AOT_USER_SCRIPT=1init becauseStringHashCryptowas absent fromensureMinimalUserStandaloneBodies()and nestedHashCryptoJitHelperJIT is deferred for user-script AOT (#16734).Changes
StringHashCryptoLlvm— thinJitVmHelperLink::ensureBridgewrappers for__compiler_hash*ABIsStringHashCryptoJit—UserScriptAotDeferNestedJitgate → LLVM bridges vs PHP helper pathContext::ensureMinimalUserStandaloneBodies()— link hash crypto during user-script standalone initStringHashCryptoPhp::callHelperBridge—extractStringPtrFromHelperResultfor non-defer buildsphp-src ref:
ext/hash/hash.c,ext/standard/hash.cVerification (2026-07-11)
Next step:
JitVmHelperLinkbridge calls cachedHashCryptoJitHelperunit butcoerceBridgeResult/ helper link returns null__string__*at execute. Bisect helper.olink + bridge return coercion (restored pre-#9164StringHashCryptoNativeJitemits wrong digests and segfaults on hash_context).Partial progress toward #3357 — not merge-ready.
Closes #3357 when
hash_raw_output+hash_context_incrementalAOT fixtures green.Made with Cursor