[php-src] PR #25015: Fix session_write_failure_keeps_data.phpt on gcov builds

From: Date: Wed, 28 Oct 2026 18:31:20 +0000
Subject: [php-src] PR #25015: Fix session_write_failure_keeps_data.phpt on gcov builds
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-40034@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25015 Author: Truta446 The master COVERAGE nightly has failed every day since Oct 22 on ext/session/tests/session_write_failure_keeps_data.phpt. The expected output matches, but the test ends with Termsig=25 (SIGXFSZ). The test sets RLIMIT_FSIZE to 0 and ignores SIGXFSZ so the session write fails with EFBIG. The limit is never lifted, and pcntl's RSHUTDOWN puts SIGXFSZ back to SIG_DFL. On a gcov build the process then writes its .gcda files at exit, gets SIGXFSZ and dies. It has been broken since the test was added. It only started showing up after the Oct 21 security merge changed run-tests to wait for the child to exit before checking how it ended. Before that, proc_get_status() ran while gcov was still dumping, so the signal was never seen. The fix restores the soft limit right after the failed write. The test already raises the hard limit to RLIMIT_INFINITY, so this works without privileges. I targeted PHP-8.4 because the test is identical there and on every branch up to master. Tested on PHP-8.4 debug+gcov: ext/session/tests went from 1 failure to 0, with and without opcache. On a master gcov build the test fails 10 out of 10 runs without the change and passes 10 out of 10 with it. The ASan suite passes both ways. I also checked that the test still catches the truncation bug it was written for, by reverting the mod_files.c part of c2b02f24df.

« previous php.git-pulls (#40034) next »