From: rainsford at acer dot edu dot au
Operating system: Windows XP
PHP version: 5.0.0
PHP Bug Type: Apache2 related
Bug description: Using an object for an array key can crash apache rather than giving
a warning
Description:
------------
Using += or -= etc. operator to assign to an array using an object for a
key crashes apache rather than giving an Illegal Offset Type warning. ++,
-- and =n don't crash apache.
FYI, I Installed the PHP windows binaries
Configure Command cscript /nologo configure.js "--enable-snapshot-build"
"--with-gd=shared"
Reproduce code:
---------------
<?php
class Foo {
}
$foo = new Foo();
$collection = array();
$collection[$foo] += 1; // crashes Apache 2.0.49 on Windows XP
?>
Expected result:
----------------
Warning: Illegal offset type in C:\work\msat\src\test\crashApache.php on
line 8
Actual result:
--------------
Apache crashes:
from Apache error log:
[Fri Aug 06 12:03:19 2004] [notice] Parent: child process exited with
status 3221225477 -- Restarting.
from Event Viewer:
Faulting application Apache.exe, version 2.0.49.0, faulting module
unknown,
version 0.0.0.0, fault address 0x00000000.
--
Edit bug report at http://bugs.php.net/?id=29543&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29543&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29543&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29543&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29543&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29543&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29543&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29543&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29543&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29543&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29543&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29543&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29543&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29543&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29543&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29543&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29543&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29543&r=float