php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65328 Segfault when getting SplStack object Value
Submitted: 2013-07-24 22:25 UTC Modified: 2013-07-25 05:20 UTC
From: alexander dot moldova at gmail dot com Assigned: colder (profile)
Status: Closed Package: SPL related
PHP Version: 5.4.17 OS: Fedora 18
Private report: No CVE-ID: None
 [2013-07-24 22:25 UTC] alexander dot moldova at gmail dot com
Description:
------------
- Getting segfault when trying to read assigned class in array or even splStack.

- Using GDB i'm getting one that may help(excluding some echos and dumps)
Program received signal SIGSEGV, Segmentation fault.
0x00000000005e69d8 in zend_std_object_get_class ()


Test script:
---------------
https://gist.github.com/AlexanderC/6075141

This gist is the script that would reproduce the bug

Expected result:
----------------
object(Node)#4 (7) {
  ["children":protected]=>
  array(0) {
  }
  ["parent":protected]=>
  object(Node)#3 (7) {
    ["children":protected]=>
    array(1) {
      [0]=>
      *RECURSION*
    }
    ["parent":protected]=>
    object(Node)#2 (7) {
      ["children":protected]=>
      array(1) {
        [0]=>
        *RECURSION*
      }
      ["parent":protected]=>
      NULL
      ["data":protected]=>
      string(4) "HEAD"
      ["uid":protected]=>
      string(63) 
"a8c3048459faa2d4b4f41acb5a3827675196e96b51f053692308c5.92526655"
      ["index":protected]=>
      int(0)
      ["assureUnique":protected]=>
      bool(false)
      ["storage":"ArrayIterator":private]=>
      array(0) {
      }
    }
    ["data":protected]=>
    string(6) "value1"
    ["uid":protected]=>
    int(1)
    ["index":protected]=>
    int(0)
    ["assureUnique":protected]=>
    bool(false)
    ["storage":"ArrayIterator":private]=>
    array(0) {
    }
  }
  ["data":protected]=>
  string(6) "value2"
  ["uid":protected]=>
  int(2)
  ["index":protected]=>
  int(0)
  ["assureUnique":protected]=>
  bool(false)
  ["storage":"ArrayIterator":private]=>
  array(0) {
  }
}

Actual result:
--------------
Process finished with exit code 139

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-25 05:20 UTC] laruence@php.net
-Assigned To: +Assigned To: colder
 [2013-07-25 14:46 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9909c4d4c4eb15a64dea0f10e10a8e3a2c0d879d
Log: Fixed bug #65328 (Segfault when getting SplStack object Value)
 [2013-07-25 14:46 UTC] laruence@php.net
-Status: Assigned +Status: Closed
 [2014-10-07 23:17 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=9909c4d4c4eb15a64dea0f10e10a8e3a2c0d879d
Log: Fixed bug #65328 (Segfault when getting SplStack object Value)
 [2014-10-07 23:28 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=9909c4d4c4eb15a64dea0f10e10a8e3a2c0d879d
Log: Fixed bug #65328 (Segfault when getting SplStack object Value)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC