Skip to content

VM: emit Zend-shaped fatals on stderr instead of silent exit 255 (#36208) - #36240

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-36208-vm-fatal-stderr
Sep 1, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-36208-vm-fatal-stderr

Conversation

@PurHur

@PurHur PurHur commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add php_compiler_cli_write_fatal_stderr / php_compiler_cli_fatal_exit helpers and route bin/vm.php / src/cli_driver.php LogicException paths through stderr (not stdout).
  • Emit Zend-shaped PHP Fatal error: lines for compile-time LogicException in Runtime::emitParseCompileFailureStderr.
  • Compliance harness (test/BaseTest.php), differential sweep, and bench now run VM with error_reporting=1, log_errors=1, display_errors=stderr so OOM fatals are visible.

Closes #36208

Test plan

  • ./script/phpunit.sh --filter VmCliFatalStderrTest — OK (3 tests, 13 assertions)
  • ./script/phpunit.sh --filter 'VmCliFatalStderrTest|CompileFatalDiagnosticShapeTest|MissingTraitFatalQuotesTest' — OK (11 tests, 36 assertions)
  • make dev-verify-fast — OK (aot-smoke 8/8, VM differential tier-0 15/15)
  • make north-star5-verify-fast — not re-run this push (passed earlier on same diff)

Made with Cursor

)

Compliance harness and CLI drivers now surface compile/runtime fatals on stderr
with error_reporting enabled, fixing empty exit-255 failures under OOM and
LogicException paths from bin/vm.php.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 2cc4f08 into master Sep 1, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-36208-vm-fatal-stderr branch September 1, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant