#26675 [Opn->Fbk]: Segfault on ArrayAccess use
| From: | eru@php.net | Date: | Sat, 20 Dec 2003 07:52:49 +0000 |
| Subject: | #26675 [Opn->Fbk]: Segfault on ArrayAccess use | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-52335@lists.php.net to get a copy of this message | ||
ID: 26675
Updated by: eru@php.net
Reported By: xi at ngs dot ru
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Debian 3.0
PHP Version: 5CVS-2003-12-19 (dev)
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2003-12-19 20:20:02] xi at ngs dot ru
Description:
------------
The following code produces segfault using snapshot php5-200312191230.
Reproduce code:
---------------
<?php
class A implements ArrayAccess
{
private $array = array();
public function offsetExists( $offset )
{ return isset( $this->array[ $offset ] ); }
public function offsetGet( $offset )
{ return $this->array[ $offset ]; }
public function offsetSet( $offset, $data )
{ $this->array[ $offset ] = $data; }
public function offsetUnset( $offset )
{ unset( $this->array[ $offset ] ); }
}
$a = new A();
$a[] = 'Segfault here!';
?>
Expected result:
----------------
String added to $a
Actual result:
--------------
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26675&edit=1