php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66302 SegFault on list() assignment with class variable multiple assignment
Submitted: 2013-12-16 15:31 UTC Modified: 2013-12-16 16:59 UTC
From: php at dynamicplus dot it Assigned:
Status: Duplicate Package: Reproducible crash
PHP Version: 5.5.7 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at dynamicplus dot it
New email:
PHP Version: OS:

 

 [2013-12-16 15:31 UTC] php at dynamicplus dot it
Description:
------------
php -n test.php 
Segmentation fault

php -n -v
PHP 5.5.7 (cli) (built: Dec 16 2013 15:06:06) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies

php -n -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
gd
hash
iconv
json
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
posix
Reflection
session
SimpleXML
sockets
SPL
standard
tidy
tokenizer
xml
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]

Test script:
---------------
<?php

  class SegFault
  {
    public $aClassVariable = NULL;

    public function __construct( )
    {
      list( $aVariable ) = $this->aClassVariable = array( NULL );
    }
  }

  new SegFault( );


Actual result:
--------------
php -n test.php 
Segmentation fault


This runs on PHP 5.3
From PHP >5.3 crashes.




<?php

  class NoSegFault
  {
    public $aClassVariable = NULL;

    public function __construct( )
    {
      $this->aClassVariable = array( NULL );
      list( $aVariable ) = $this->aClassVariable;
    }
  }

  new NoSegFault( );


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-16 16:59 UTC] bwoebi@php.net
-Status: Open +Status: Duplicate
 [2013-12-16 16:59 UTC] bwoebi@php.net
Duplicate of #65969 (Should be fixed in master and next php 5.4.* or php 5.5.*)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 20:01:30 2025 UTC