1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/sysvshm/tests/gh16591.phpt
Niels Dossche 992ac1c25a Fix GH-16591: Assertion error in shm_put_var
Closes GH-16610.

Suggested-by: "Christoph M. Becker" <cmbecker69@gmx.de>
2024-10-26 15:07:22 +02:00

26 lines
422 B
PHP

--TEST--
GH-16591 (Assertion error in shm_put_var)
--EXTENSIONS--
sysvshm
--FILE--
<?php
class C {
function __serialize(): array {
global $mem;
shm_detach($mem);
return ['a' => 'b'];
}
}
$mem = shm_attach(1);
try {
shm_put_var($mem, 1, new C);
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Shared memory block has been destroyed by the serialization function