#50611 [Opn]: Segfault when trying $var =& $non_array_var[some_index]

From: Date: Wed, 30 Dec 2009 08:45:54 +0000
Subject: #50611 [Opn]: Segfault when trying $var =& $non_array_var[some_index]
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-146204@lists.php.net to get a copy of this message
ID: 50611 User updated by: an0nym at narod dot ru Reported By: an0nym at narod dot ru Status: Open Bug Type: Reproducible crash -Operating System: FreeBSD 7.2-RELEASE-p3 +Operating System: FreeBSD 7.2-RELEASE-p3 etc -PHP Version: 5.3.1 +PHP Version: 5.3.1, 5.3.0, 5.2.10 New Comment: Segfault occurs on Windows 2003/XP, PHP 5.3.1, NTS, VC6, FastCGI Debian, PHP 5.3.0-3 FreeBSD, PHP 5.2.10 FreeBSD, PHP 5.3.1 Fatal error occurs on Ubuntu 6.3, PHP 5.2.10-2 FreeBSD, PHP 5.2.9 FreeBSD, PHP 5.2.6 FreeBSD, PHP 5.2.11 Previous Comments: ------------------------------------------------------------------------ [2009-12-30 08:35:42] mikhail dot v dot gavrilov at gmail dot com Can confirm this. OS: (Windows 2003 SP2 || Windows XP SP3) && PHP 5.3.1 NTS VC6 ------------------------------------------------------------------------ [2009-12-30 08:30:22] an0nym at narod dot ru Description: ------------ Segmentation fault occurs when trying to assign a var to a reference onto some index of a string variable. (I know it's dumb, but no segfault should occur, but a Fatal error: ...) Reproduce code: --------------- <?php $value1 = 'foobar'; $value2 = &$value1[0]; Expected result: ---------------- Fatal Error Actual result: -------------- Segmentation Fault ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50611&edit=1

« previous php.bugs (#146204) next »