PHP 4.0 Bug #9454 Updated: Reference issue 2
| From: | mailling at bigfoot dot com | Date: | Mon, 26 Feb 2001 21:34:15 +0000 |
| Subject: | PHP 4.0 Bug #9454 Updated: Reference issue 2 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47581@lists.php.net to get a copy of this message | ||
ID: 9454
User Update by: mailling@bigfoot.com
Status: Open
Bug Type: Scripting Engine problem
Description: Reference issue 2
This problem seems to be related to the bug 9407 also.
I am not sure it is due to the garbage collector.
I ran it as a CGI or with ISAPI filter, I increased the amount of memeory a thread could take until
13Mb, with Linux also.
I destroyed the process...
I think it is due to a buffer overflow somewhere when a reference is built, or something like that.
Good luck
Previous Comments:
---------------------------------------------------------------------------
[2001-02-26 05:18:27] mailling@bigfoot.com
I got in trouble with reference.
Issues with Linux, Mandrake 7.2 and Windows 2000
with PHP 4.04pl1, php 4.0.3 php 4.0.1pl2
I am unable to give small script, the problem seems to appear only on big script, some refences
seems to be messed up.
What I did.
I used MySql to query a system.
When I check the result of a query, I got a resource ID
But sometimes, the resource ID is a big number, ie 18739485
I belived the problem came from MySql, but I used ODBC to find a turn around, with the same problem.
The worst is the such a resource is working well after for the next_record statement.
Then, I realize a dump of a big variable, that contains references of objects, of arrays...
And one of this variable inside is at the beginning a number, and becomes a reference to another
object. I checked the code, and the variable is written only once.
Something else, I write to the screen a string using printf() or echo sprintf(), and I find this
string in the big variable.
Worst, I notice some strange characters in this object (with ascii code >127)
It seems that in some condition, the memory manager doesn't work well. With my code, PHP hangs
on while it is trying to print a resource ID variable (on Unix or PHP).
I can send you my code if you are interested in. For a core file, I didn't compile PHP- Linux
with the debug option. Do you know how I can do the same thing with Windows?
Hope that helps
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=9454