mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Fixed bug #78986
Don't assume that handlers live in the arena, they may also be in SHM.
This commit is contained in:
parent
203308f6c3
commit
bd4fce4f6f
2
NEWS
2
NEWS
@ -14,6 +14,8 @@ PHP NEWS
|
||||
. Fixed bug #78950 (Preloading trait method with static variables). (Nikita)
|
||||
. Fixed bug #78903 (Conflict in RTD key for closures results in crash).
|
||||
(Nikita)
|
||||
. Fixed bug #78986 (Opcache segfaults when inheriting ctor from immutable
|
||||
into mutable class). (Nikita)
|
||||
|
||||
- Spl:
|
||||
. Fixed bug #78976 (SplFileObject::fputcsv returns -1 on failure). (cmb)
|
||||
|
28
ext/opcache/tests/bug78986.phpt
Normal file
28
ext/opcache/tests/bug78986.phpt
Normal file
@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug #78986: Opcache segfaults when inheriting ctor from immutable into mutable class
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
define('TEST_TEST', 1);
|
||||
|
||||
class TestClass2 {
|
||||
function __construct() {}
|
||||
}
|
||||
|
||||
class TestClass extends TestClass2 {
|
||||
var $test = [
|
||||
TEST_TEST => 'test'
|
||||
];
|
||||
}
|
||||
|
||||
var_dump(new TestClass());
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
object(TestClass)#1 (1) {
|
||||
["test"]=>
|
||||
array(1) {
|
||||
[1]=>
|
||||
string(4) "test"
|
||||
}
|
||||
}
|
@ -246,7 +246,7 @@ static void zend_hash_clone_prop_info(HashTable *ht)
|
||||
|
||||
#define zend_update_inherited_handler(handler) \
|
||||
{ \
|
||||
if (ce->handler != NULL) { \
|
||||
if (ce->handler != NULL && IN_ARENA(ce->handler)) { \
|
||||
ce->handler = ARENA_REALLOC(ce->handler); \
|
||||
} \
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user