Re: [PHP-DEV] 16-bit reference count in PHP 4's zval

2006-01-09 Thread Jani Taskinen
On Tue, 10 Jan 2006, Tim Starling wrote: Upgrading to PHP 5 is certainly a reasonable solution, it's been on our wishlist for a while. We will probably drop support for PHP 4 in MediaWiki 1.6 or 1.7, so that we can take advantage of the new features. Upgrading We've used MediaWiki at work

Re: [PHP-DEV] 16-bit reference count in PHP 4's zval

2006-01-09 Thread Tim Starling
Alan Pinstein wrote: > It seems that the problem you're encountering could be fixed trivially > by moving the initialization of $stuff into the constructor. > > However, it's difficult to tell from the provided code whether $stuff > is intended as a static member... but if it's not, seems like

Re: [PHP-DEV] 16-bit reference count in PHP 4's zval

2006-01-09 Thread Alan Pinstein
It seems that the problem you're encountering could be fixed trivially by moving the initialization of $stuff into the constructor. However, it's difficult to tell from the provided code whether $stuff is intended as a static member... but if it's not, seems like a very simple fix... I d

Re: [PHP-DEV] 16-bit reference count in PHP 4's zval

2006-01-08 Thread Zeev Suraski
At 00:00 09/01/2006, Tim Starling wrote: Zeev Suraski wrote: > Tim, > > Your analysis was correct until the last sentence - PHP surely does > support arrays with more than 64K entries. It just doesn't support the > same entry being linked from more than 64K locations (which is much, > much more

Re: [PHP-DEV] 16-bit reference count in PHP 4's zval

2006-01-08 Thread Tim Starling
Zeev Suraski wrote: > Tim, > > Your analysis was correct until the last sentence - PHP surely does > support arrays with more than 64K entries. It just doesn't support the > same entry being linked from more than 64K locations (which is much, > much more rare occurrence). Well yes, I was just s

Re: [PHP-DEV] 16-bit reference count in PHP 4's zval

2006-01-08 Thread Zeev Suraski
At 06:47 07/01/2006, Tim Starling wrote: I've had some trouble with large arrays in my PHP programs causing corruption of the heap. I tracked the problem back to PHP 4's 16-bit reference count. If you have more than 64K references to a given zval, the counter will overflow, then when the referenc

Re: [PHP-DEV] 16-bit reference count in PHP 4's zval

2006-01-07 Thread Marcus Boerger
Hello Tim, that's a major API break so we would need to make that 4.5. Which is kind of out of question atm. Just change to 5. marcus Saturday, January 7, 2006, 5:47:27 AM, you wrote: > I've had some trouble with large arrays in my PHP programs causing > corruption of the heap. I tracked the

[PHP-DEV] 16-bit reference count in PHP 4's zval

2006-01-06 Thread Tim Starling
I've had some trouble with large arrays in my PHP programs causing corruption of the heap. I tracked the problem back to PHP 4's 16-bit reference count. If you have more than 64K references to a given zval, the counter will overflow, then when the references are freed, the object will be double-fre