Skip to content

Stdlib: PHP 8.5 max_memory_limit INI ceiling (#23232)#23238

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-23232-max-memory-limit
Jul 26, 2026
Merged

Stdlib: PHP 8.5 max_memory_limit INI ceiling (#23232)#23238
PurHur merged 1 commit into
masterfrom
agent/issue-23232-max-memory-limit

Conversation

@PurHur

@PurHur PurHur commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Closes Stdlib: max_memory_limit INI missing on PROFILE=8.5 — memory_limit ceiling (main/ini) #23232: register max_memory_limit under PHP_COMPILER_PROFILE=8.5 (default "-1", INI_SYSTEM)
  • Runtime ini_set('max_memory_limit') rejected; -d / --INI-- startup applies Zend OnChangeMaxMemoryLimit (sets both ceiling and memory_limit)
  • ini_set('memory_limit', …) above a finite ceiling warns and clamps; unlimited (-1) clamps silently — php-src main/main.c
  • Absent on PROFILE<8.5 (ini_get / get_cfg_var false)

PHP-in-PHP: ext/standard/VmIni.php + IniJitHelper.php; gate CompilerVersion::supportsMaxMemoryLimit().

Test plan

  • Issue repros:
PHP_COMPILER_PROFILE=8.5 php bin/vm.php test/repro/maintainer_gap_max_memory_limit_ini_85.php
# => default-ok
PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/maintainer_gap_max_memory_limit_ini_absent.php
# => absent-ok
PHP_COMPILER_PROFILE=8.5 php bin/vm.php -d max_memory_limit=64M test/repro/maintainer_gap_max_memory_limit_ini_85_ceiling.php
# => ceiling-ok
  • vendor/bin/phpunit --exclude-group llvm --filter max_memory_limit → OK (6 tests)
  • php script/bootstrap-inventory.php --check → OK 6561/6561

Pre-claim gates: bootstrap-selfhost-link OK; inventory OK; release-readiness user_release_ready: yes; helloworld OK.

Made with Cursor

Register INI_SYSTEM max_memory_limit under PROFILE=8.5 (default -1), reject
runtime ini_set, and clamp memory_limit overshoots like php-src main/main.c.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur force-pushed the agent/issue-23232-max-memory-limit branch from c94bf98 to 67ab00f Compare July 26, 2026 00:30
@PurHur
PurHur merged commit 27b6bfc into master Jul 26, 2026
@PurHur
PurHur deleted the agent/issue-23232-max-memory-limit branch July 26, 2026 00:31
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.

Stdlib: max_memory_limit INI missing on PROFILE=8.5 — memory_limit ceiling (main/ini)

1 participant