Skip to content

AOT: filter_input IF_G snapshot vs live $_GET (#33946) - #33949

Merged
PurHur merged 1 commit into
masterfrom
fix/33946-filter-input-aot-snapshot
Aug 22, 2026
Merged

PurHur merged 1 commit into
masterfrom
fix/33946-filter-input-aot-snapshot

Conversation

@PurHur

@PurHur PurHur commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Thin AOT filter_input() / filter_has_var() read live sg_GET after Stdlib: filter_input() request-input snapshot vs live $_GET (#19640) #19650 left JIT/AOT on the mutable tables — CLI showed 42 where Zend/VM return NULL.
  • __superglobals__refresh now deep-copies GET/POST/COOKIE into if_* IF_G globals; filter lowering prefers those snapshots (MCJIT falls back to live sg_* while if_* is unset).
  • AOT fixtures + repros guard CLI empty-request and CGI immutable-snapshot cases.

php-src: ext/filter/filter.c — php_filter_get_input / IF_G(get_array)

Closes #33946

Test plan

  • ./script/aot-smoke.sh → 8 passed, 0 failed
  • CLI AOT repro → NULL / NULL / false (matches Zend/VM)
  • QUERY_STRING=x=42 AOT → 42 / 42 / '99' (matches VM)
  • ./script/phpunit.sh --filter 'filter_input_request_snapshot|filter_input_cgi_snapshot_immutable' test/aot/AotTest.php → OK (2 tests)

Verification transcript

aot-smoke: 8 passed, 0 failed
CLI AOT: NULL / NULL / false
CGI AOT: 42 / 42 / '99'
OK (2 tests, 10 assertions)

Made with Cursor

Standalone refresh deep-copies GET/POST/COOKIE into if_* so filter_input
and filter_has_var match php-src request tables (re-#19640); MCJIT falls
back to live sg_* while if_* is unset.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit da8da1d into master Aug 22, 2026
1 check failed
@PurHur
PurHur deleted the fix/33946-filter-input-aot-snapshot branch August 22, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: AOT filter_input(INPUT_GET) follows live $_GET — Zend CLI NULL (re-#19640, ext/filter/filter.c)

1 participant