Category
Foundation: · loud failures · child of #36188
Problem
Reproduced on master 4eed6a2785: test/BaseTest.php:164-166 spawns every compliance case with -d display_errors=0 -d error_reporting=0; an OOM under those flags yields empty stdout, empty stderr, exit 255. With -d error_reporting=1 -d log_errors=1 the same OOM prints PHP Fatal error: Allowed memory size … exhausted on stderr and stdout stays clean. This is the "silent exit 255" class from #15906/#36148, and it also hides real fatals in nightly runs.
VM-originated fatals are fine (ErrorReporter::writeCliErrorOutput, lib/VM/ErrorReporter.php:756-767 always writes STDERR), but two driver paths are not: bin/vm.php:52-55 and src/cli_driver.php:373-379 — catch (\CompileError) { exit(255); } with no output, and catch (\LogicException) { echo …; exit(255); } which writes to stdout without a PHP Fatal error: prefix. lib/Block.php:1779 ("Could not resolve argument") and lib/VM/Variable.php:1774 ("Unsupported type copy") throw exactly those.
PHP implementation target
test/BaseTest.php: -d error_reporting=1 -d log_errors=1 -d display_errors=stderr (expected-output comparison is on stdout; stderr is captured separately).
bin/vm.php / src/cli_driver.php: every catch writes PHP Fatal error: <class>: <message> in <file>:<line> to stderr and exits 255; add a unit test that runs the two throw sites through the driver and asserts stderr is non-empty.
script/bench.php and differential-sweep.sh: same flags for the VM side.
Done when
Category
Foundation:· loud failures · child of #36188Problem
Reproduced on master
4eed6a2785:test/BaseTest.php:164-166spawns every compliance case with-d display_errors=0 -d error_reporting=0; an OOM under those flags yields empty stdout, empty stderr, exit 255. With-d error_reporting=1 -d log_errors=1the same OOM printsPHP Fatal error: Allowed memory size … exhaustedon stderr and stdout stays clean. This is the "silent exit 255" class from #15906/#36148, and it also hides real fatals in nightly runs.VM-originated fatals are fine (
ErrorReporter::writeCliErrorOutput, lib/VM/ErrorReporter.php:756-767 always writes STDERR), but two driver paths are not:bin/vm.php:52-55andsrc/cli_driver.php:373-379—catch (\CompileError) { exit(255); }with no output, andcatch (\LogicException) { echo …; exit(255); }which writes to stdout without aPHP Fatal error:prefix.lib/Block.php:1779("Could not resolve argument") andlib/VM/Variable.php:1774("Unsupported type copy") throw exactly those.PHP implementation target
test/BaseTest.php:-d error_reporting=1 -d log_errors=1 -d display_errors=stderr(expected-output comparison is on stdout; stderr is captured separately).bin/vm.php/src/cli_driver.php: every catch writesPHP Fatal error: <class>: <message> in <file>:<line>to stderr and exits 255; add a unit test that runs the two throw sites through the driver and asserts stderr is non-empty.script/bench.phpanddifferential-sweep.sh: same flags for the VM side.Done when
VMTest.failingname-set unchangedexit(255)inbin/orsrc/without a preceding stderr write (grep-gated incheck-generated-docs.shor a unit test)