Bug #78151 [Opn->Ver]: Segfault caused by indirect expressions in PHP 7.4a1

From: Date: Wed, 12 Jun 2019 20:01:20 +0000
Subject: Bug #78151 [Opn->Ver]: Segfault caused by indirect expressions in PHP 7.4a1
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221257@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78151&edit=1 ID: 78151 Updated by: nikic@php.net Reported by: jfcherng at gmail dot com Summary: Segfault caused by indirect expressions in PHP 7.4a1 -Status: Open +Status: Verified Type: Bug Package: Scripting Engine problem Operating System: Win7 x64 PHP Version: Next Minor Version Block user comment: N Private report: N New Comment: Also repros on Ubuntu for me. Previous Comments: ------------------------------------------------------------------------ [2019-06-12 19:54:39] jfcherng at gmail dot com Description: ------------ I downloaded the PHP 7.4 alpha 1 release from "https://windows.php.net/downloads/qa/php-7.4.0alpha1-nts-Win32-vs16-x64.zip" and decompressed it without any modification (I did not even create a php.ini). I then ran the attached test script with the PHP QA release ( $ php.exe test.php ) and got a segfault. I *cannot* reproduce this issue on my CentOS machine somehow. Test script: --------------- <?php class Arr { private $foo = ''; public function __construct(array $array = []) { $property = 'foo'; // segfault in PHP 7.4.0alpha1 but is fine in PHP 7.3.7RC1 $this->{$property} = &$array[$property]; // this is fine in both PHP versions // $this->foo = &$array[$property]; \var_dump($this->foo); } } $arr = new Arr(['foo' => 'bar']); Expected result: ---------------- string(3) "bar" Actual result: -------------- Segmentation fault ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78151&edit=1

« previous php.bugs (#221257) next »