mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
26 lines
422 B
PHP
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
|