<?php
class Person {
public $dad;
public function __destruct() {
$this->dad = null; /* no segfault if this is commented out
*/
}
}
class Dad extends Person {
public $son;
public function __construct() {
$this->son = new Person;
$this->son->dad = $this; /* no segfault if this is
commented out */
}
public function __destruct() {
$dad = new dad;
parent::__destruct(); /* segfault here */
}
}
$o = new Dad;
unset($o);
echo "ok\n";
ok
Fatal error: Out of memory (allocated 20971520 bytes) (tried to allocate 33554432 bytes) in /in/UvW9v on line 26
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for 8.1.10 - 8.1.27
ok
Fatal error: Out of memory (allocated 20971520) (tried to allocate 33554432 bytes) in /in/UvW9v on line 26
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for 8.1.2 - 8.1.9
ok
Fatal error: Out of memory (allocated 25165824) (tried to allocate 33554432 bytes) in /in/UvW9v on line 26
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
ok
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 67108864 bytes) in /in/UvW9v on line 26
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 8.0.13
ok
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 134217728 bytes) in /in/UvW9v on line 26
Process exited with code 255.
Output for 7.2.5
ok
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 67108864 bytes) in /in/UvW9v on line 26
Process exited with code 137.
ok
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 33554432 bytes) in /in/UvW9v on line 26
Process exited with code 255.
Output for 5.4.10 - 5.4.19
ok
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/UvW9v on line 39
Process exited with code 139.
Output for 5.4.0 - 5.4.9
ok
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 8 bytes) in /in/UvW9v on line 26
Process exited with code 139.
Output for 5.3.0 - 5.3.29
ok
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/UvW9v on line 26
Process exited with code 139.
Output for 5.2.10 - 5.2.17
ok
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24 bytes) in /in/UvW9v on line 11
Process exited with code 255.
Output for 5.2.9
ok
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 75 bytes) in /in/UvW9v on line 26
Process exited with code 255.
ok
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/UvW9v on line 26
Process exited with code 255.
Output for 5.2.1
ok
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 64 bytes) in /in/UvW9v on line 26
Process exited with code 255.
Output for 5.2.0
ok
Process exited with code 137.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/UvW9v on line 7
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/UvW9v on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/UvW9v on line 7
Process exited with code 255.