Commit da9d79a101f for php

commit da9d79a101f32006a5c51528e5365b2ad9e40dbe
Author: Gina Peter Banyard <girgias@php.net>
Date:   Sun Oct 18 13:21:33 2026 +0100

    ci: fix MSAN/PowerPC nightly CI

    Closes GH-24407

diff --git a/ext/standard/tests/streams/stream_errors_operation_depth_limit.phpt b/ext/standard/tests/streams/stream_errors_operation_depth_limit.phpt
index 1eae9c5fd31..71abf5a0388 100644
--- a/ext/standard/tests/streams/stream_errors_operation_depth_limit.phpt
+++ b/ext/standard/tests/streams/stream_errors_operation_depth_limit.phpt
@@ -2,8 +2,30 @@
 Stream errors: operations refused by the depth limit keep the stack consistent
 --INI--
 zend.max_allowed_stack_size=-1
+--SKIPIF--
+<?php
+if (getenv('SKIP_ASAN')) {
+    if (!function_exists('posix_setrlimit') || !defined('POSIX_RLIMIT_STACK')) {
+        die('skip ASan/MSan needs a larger C stack');
+    }
+    [, $hard] = posix_getrlimit(POSIX_RLIMIT_STACK);
+    if (($hard !== 'unlimited' && $hard < 32 * 1024 * 1024)
+        || !posix_setrlimit(POSIX_RLIMIT_STACK, 32 * 1024 * 1024, $hard === 'unlimited' ? -1 : $hard)) {
+        die('skip MSan needs a larger C stack');
+    }
+}
+?>
 --FILE--
 <?php
+// ASan/MSan needs more stack to reach the stream error operation limit.
+if (getenv('SKIP_ASAN') && function_exists('posix_setrlimit') && defined('POSIX_RLIMIT_STACK')) {
+    [$soft, $hard] = posix_getrlimit(POSIX_RLIMIT_STACK);
+    if ($soft !== 'unlimited' && $soft < 32 * 1024 * 1024
+        && ($hard === 'unlimited' || $hard >= 32 * 1024 * 1024)) {
+        posix_setrlimit(POSIX_RLIMIT_STACK, 32 * 1024 * 1024, $hard === 'unlimited' ? -1 : $hard);
+    }
+}
+
 class RecursiveStream
 {
     public $context;