1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/bug70258.phpt
Shivam Mathur 6233dc6210 Switch to windows-2022 in CI (#18927)
* Switch to windows-2022 in CI

windows-2019 runner will be dropped by GitHub on 2025-06-30.

* xfail test cases that fail on windows-2022
2025-06-25 01:57:07 +05:30

32 lines
643 B
PHP

--TEST--
Bug #70258 (Segfault if do_resize fails to allocated memory)
--INI--
memory_limit=2M
--SKIPIF--
<?php
if (PHP_OS_FAMILY === 'Windows') {
die("xfail fails on Windows Server 2022 and newer.");
}
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
if ($zend_mm_enabled === "0") {
die("skip Zend MM disabled");
}
?>
--FILE--
<?php
class A {
public $arr;
public function core() {
$this->arr["no_pack"] = 1;
while (1) {
$this->arr[] = 1;
}
}
}
$a = new A;
$a->core();
?>
--EXPECTF--
Fatal error: Allowed memory size of 2097152 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d