mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Merge branch 'PHP-8.4'
* PHP-8.4: Fix leak+crash with sapi_windows_set_ctrl_handler()
This commit is contained in:
commit
3c84b01e02
4 changed files with 52 additions and 2 deletions
28
sapi/cli/tests/sapi_windows_set_ctrl_handler_leak.phpt
Normal file
28
sapi/cli/tests/sapi_windows_set_ctrl_handler_leak.phpt
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue