[php-src] master: ci: fix MSAN/PowerPC nightly CI

From: Date: Sun, 18 Oct 2026 16:49:09 +0000
Subject: [php-src] master: ci: fix MSAN/PowerPC nightly CI
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142414@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Date: 2026-10-18T17:47:40+01:00 Commit: https://github.com/php/php-src/commit/da9d79a101f32006a5c51528e5365b2ad9e40dbe Raw diff: https://github.com/php/php-src/commit/da9d79a101f32006a5c51528e5365b2ad9e40dbe.diff ci: fix MSAN/PowerPC nightly CI Closes GH-24407 Changed paths: M ext/standard/tests/streams/stream_errors_operation_depth_limit.phpt Diff: 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 1eae9c5fd31d..71abf5a03885 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;

« previous php.cvs (#142414) next »