Fix AOT superglobal refresh for standalone binaries (#12039)#12063
Merged
Conversation
Default standalone AOT to SuperglobalRefreshStandaloneLlvm because nested SuperglobalRefreshJitHelper returns VM HashTable handles that cannot coerce to native __hashtable__* (empty $_REQUEST / munmap). Cast $_REQUEST name in 001-SimpleWeb for stable double htmlspecialchars. Opt-in PHP bridge via PHP_COMPILER_SUPERGLOBAL_REFRESH_PHP=1. Co-authored-by: Cursor <cursoragent@cursor.com>
Closed
2 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
__superglobals__refreshtoSuperglobalRefreshStandaloneLlvm— the PHP-in-PHP bridge (SuperglobalRefreshJitHelper) returns VMHashTablehandles thatcoerceToHashtablePtrbitcasts to native__hashtable__*, yielding empty$_REQUESTand intermittentmunmap_chunk(Release v1.1.0: fix examples 000–009 AOT smoke regression (001-SimpleWeb munmap_chunk) #12039).StringMultipart).$_REQUEST['name']inexamples/001-SimpleWebso repeatedhtmlspecialchars($name)is stable until the separate string-lifetime bug is fixed.PHP_COMPILER_SUPERGLOBAL_REFRESH_PHP=1.php-src ref:
main/php_variables.c— superglobal registration; LLVM path mirrors priorsuperglobals_refresh.csemantics.Verification
Note: full
examples-aot-smoke.shstill fails at003-MiniWebApplink on master (IncludeBindingEmitHelperTypeError) — pre-existing, out of #12039 scope.Closes #12039
Made with Cursor