From: xi at ngs dot ru
Operating system: Debian 3.0
PHP version: 5CVS-2003-12-19 (dev)
PHP Bug Type: Reproducible crash
Bug description: Segfault on ArrayAccess use
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 bug report at http://bugs.php.net/?id=26675&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26675&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26675&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26675&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26675&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26675&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26675&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26675&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26675&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26675&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26675&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26675&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26675&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26675&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26675&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26675&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26675&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26675&r=float