Commit 7d4f779ee99 for php.net
commit 7d4f779ee99e168db5d63c07e92e2761e47a4f0d
Author: Jakub Zelenka <bukka@php.net>
Date: Sun Sep 20 09:08:18 2026 +0200
Skip bz2 GH-20807 test when less than 13 GiB of memory is available
The decompressed output of this test peaks at more than 12 GiB of RSS.
On smaller machines, such as the 7 GB GitHub-hosted runners used for
private repositories, this exhausts the whole VM and the OOM killer takes
the test runner down with it, so the job dies with a runner shutdown
signal instead of a test failure.
Gate the test on MemAvailable from /proc/meminfo like the other
resource-heavy tests gate on memory, so it keeps running on the 16 GB
public runners and skips itself elsewhere.
diff --git a/ext/bz2/tests/gh20807.phpt b/ext/bz2/tests/gh20807.phpt
index ee3238b711b..ed52c708585 100644
--- a/ext/bz2/tests/gh20807.phpt
+++ b/ext/bz2/tests/gh20807.phpt
@@ -12,6 +12,12 @@
if (PHP_OS_FAMILY === 'Darwin') die('skip Too slow');
if (PHP_INT_SIZE !== 8) die('skip Only for 64-bit systems');
if (getenv('SKIP_ASAN')) die('skip ASAN makes this test too slow');
+// The decompressed output needs more than 12 GiB of memory at its peak, which
+// takes down smaller machines (e.g. 7 GB CI runners) with the OOM killer.
+$memInfo = @file_get_contents('/proc/meminfo');
+if ($memInfo && preg_match('/MemAvailable:\s+(\d+) kB/', $memInfo, $m) && $m[1] < 13 * 1024 * 1024) {
+ die('skip Insufficient available memory (less than 13 GiB)');
+}
?>
--FILE--
<?php