summaryrefslogtreecommitdiff
path: root/ext/opcache/tests
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-12-18 11:37:39 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-12-18 11:40:58 +0100
commitbd4fce4f6f5f40f71802f0b2ad12a925af0667c1 (patch)
tree1542c1ce95aa83c724df37a8a7af3f8e766ba992 /ext/opcache/tests
parent203308f6c39730fb356a9e8b1bd4760cf2643cdf (diff)
downloadphp-git-bd4fce4f6f5f40f71802f0b2ad12a925af0667c1.tar.gz
Fixed bug #78986
Don't assume that handlers live in the arena, they may also be in SHM.
Diffstat (limited to 'ext/opcache/tests')
-rw-r--r--ext/opcache/tests/bug78986.phpt28
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/opcache/tests/bug78986.phpt b/ext/opcache/tests/bug78986.phpt
new file mode 100644
index 0000000000..9479460f76
--- /dev/null
+++ b/ext/opcache/tests/bug78986.phpt
@@ -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"
+ }
+}