com php-src: test for bug #78151: Zend/tests/bug78151.phpt
| From: | Joe Watkins | Date: | Wed, 12 Jun 2019 20:39:00 +0000 |
| Subject: | com php-src: test for bug #78151: Zend/tests/bug78151.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106746@lists.php.net to get a copy of this message | ||
Commit: b2b0e5246650bc6b63e841614110e471a061d577
Author: Joe Watkins <krakjoe@php.net> Wed, 12 Jun 2019 22:39:00 +0200
Parents: 175c7bf6fe0ceeb4b5dc08e08837b411ab05ff6b
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b2b0e5246650bc6b63e841614110e471a061d577
Log:
test for bug #78151
Bugs:
https://bugs.php.net/78151
Changed paths:
A Zend/tests/bug78151.phpt
Diff:
diff --git a/Zend/tests/bug78151.phpt b/Zend/tests/bug78151.phpt
new file mode 100644
index 0000000..87b98a4
--- /dev/null
+++ b/Zend/tests/bug78151.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #78151 Segfault caused by indirect expressions in PHP 7.4a1
+--FILE--
+<?php
+
+class Arr
+{
+ private $foo = '';
+
+ public function __construct(array $array = [])
+ {
+ $property = 'foo';
+
+ $this->{$property} = &$array[$property];
+
+ \var_dump($this->foo);
+ }
+}
+
+$arr = new Arr(['foo' => 'bar']);
+?>
+--EXPECT--
+string(3) "bar"