php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64777 Segmentation fault on array update
Submitted: 2013-05-06 02:10 UTC Modified: 2017-10-24 23:02 UTC
Votes:11
Avg. Score:2.5 ± 1.9
Reproduced:0 of 0 (0.0%)
From: ryan dot brothers at gmail dot com Assigned:
Status: Suspended Package: operator (PECL)
PHP Version: 5.4.14 OS: Linux
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: ryan dot brothers at gmail dot com
New email:
PHP Version: OS:

 

 [2013-05-06 02:10 UTC] ryan dot brothers at gmail dot com
Description:
------------
The following code gives me a segmentation fault.

Test script:
---------------
<?php
class a
{
    public $rows = array('names' => 0);

    function test()
    {
        $index = 'names';
        $amount = 1;

        $this->rows[$index] += $amount;
    }
}

$a = new a;
$a->test();

print_r($a->rows);


Expected result:
----------------
Array
(
    [names] => 1
)


Actual result:
--------------
Segmentation fault.

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe8ee86f6 in _php_operator_binary_assign_op (execute_data=0x7ffff7f90220,
    methodname=0x7fffe8eef922 "__assign_add", methodname_len=12)
    at /opt/src/operator-0.4.1/operator.c:422


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-05-06 02:11 UTC] ryan dot brothers at gmail dot com
Program received signal SIGSEGV, Segmentation fault.
0x00007fffe8ee86f6 in _php_operator_binary_assign_op (execute_data=0x7ffff7f90220,
    methodname=0x7fffe8eef922 "__assign_add", methodname_len=12)
    at /home/ryan/src/operator-0.4.1/operator.c:422
422                             if (!object || Z_TYPE_P(object) != IS_OBJECT) {
 [2013-05-06 23:26 UTC] sixd@php.net
Giving your build options and platform details would be helpful.
Also a backtrace is always useful for a crash bug, see https://bugs.php.net/bugs-
generating-backtrace.php
 [2013-05-07 15:17 UTC] ryan dot brothers at gmail dot com
This problem is specific to using PECL operator as indicated above.  It might be related to https://bugs.php.net/bug.php?id=64278.  I am using operator 0.4.1 plus the patch in bug 64278.  Please let me know if that helps to reproduce it.
 [2017-10-24 23:02 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-10-24 23:02 UTC] kalle@php.net
The operator PECL package have not had a release for 4 years and development activity seems to have ceased, if a new maintainer picks up this package, then this report should be re-opened
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC