From:             twm at twmacinta dot com
Operating system: RHEL ES 3 update 7
PHP version:      4.4.2
PHP Bug Type:     Scripting Engine problem
Bug description:  Some objects become corrupted after 32767 instantiations

Description:
------------
Hello,

I have a set of two classes which are used together and which work fine
initially but which result in memory corruption after being instantiated
32767 times.  I have attached the URL of a sample script which
demonstrates the problem since I wasn't able to reproduce it in 20 lines
or less.  I ran the program through Valgrind to see if it could ferret out
more specifics, but it didn't report any errors.

Thanks,
- Tim Macinta


Reproduce code:
---------------
http://www.twmacinta.com/php_bugs/object_corruption_20060319.php.txt

Expected result:
----------------
Start
Middle: 0
Middle: 10000
Middle: 20000
Middle: 30000

...

Middle: 9999999
End


Actual result:
--------------
Start
Middle: 0
Middle: 10000
Middle: 20000
Middle: 30000
Middle: 32761
Middle: 32762
Middle: 32763
Middle: 32764
Middle: 32765
Middle: 32766
foo was not defined


-- 
Edit bug report at http://bugs.php.net/?id=36793&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36793&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36793&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36793&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=36793&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=36793&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=36793&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=36793&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=36793&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=36793&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=36793&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=36793&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=36793&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=36793&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36793&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=36793&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=36793&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=36793&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36793&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=36793&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=36793&r=mysqlcfg

Reply via email to