Merge branch 'PHP-8.4'

* PHP-8.4:
  Fix leak+crash with sapi_windows_set_ctrl_handler()
This commit is contained in:
Niels Dossche 2025-05-05 19:14:19 +02:00
commit 3c84b01e02
No known key found for this signature in database
GPG key ID: B8A8AD166DF0E2E5
4 changed files with 52 additions and 2 deletions

View file

@ -0,0 +1,28 @@
--TEST--
sapi_windows_set_ctrl_handler() leak bug
--SKIPIF--
<?php
include "skipif.inc";
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')
die("skip this test is for Windows platforms only");
?>
--FILE--
<?php
class Test {
public function set() {
sapi_windows_set_ctrl_handler(self::cb(...));
}
public function cb() {
}
}
$test = new Test;
$test->set();
echo "Done\n";
?>
--EXPECT--
Done