Bug #2033 Updated: serialize() produces: FATAL: emalloc(): Unable to allocate 4160742841l bytes
| From: | sniper@php.net | Date: | Mon, 17 Jun 2002 02:43:02 +0000 |
| Subject: | Bug #2033 Updated: serialize() produces: FATAL: emalloc(): Unable to allocate 4160742841l bytes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10812@lists.php.net to get a copy of this message | ||
ID: 2033
Updated by: sniper@php.net
Reported By: elfchief@lupine.org
-Status: Feedback
+Status: Bogus
Bug Type: Misbehaving function
Operating System: SunOS 4.1.3
PHP Version: 3.0.12
Previous Comments:
------------------------------------------------------------------------
[2002-06-16 08:37:19] sander@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately, PHP 3 is no longer supported. Please download
the latest version of PHP 4 from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
------------------------------------------------------------------------
[1999-11-12 12:01:11] joey@cvs.php.net
If I am not mistaken, thies is trying to say that configure should
decide whether to use
sprintf() or _php3_sprintf(). I beleive this is in progress. Should
this be "assigned"?
------------------------------------------------------------------------
[1999-08-31 09:25:30] thies@cvs.php.net
unifixed - configure needs to find that out!
------------------------------------------------------------------------
[1999-08-31 09:20:26] thies@cvs.php.net
fixed in CVS
------------------------------------------------------------------------
[1999-08-11 14:13:08] elfchief@lupine.org
Calling serialize() produces an "unable to allocate insane amounts of
memory" error... Even <? serialize(5); ?> will produce this error.
This is caused because functions/var.c is using sprintf() rather than
_php3_sprintf(), where the latter is designed to work around a
'feature' in SunOS where sprintf returns the string written (char *)
rather than the number of characters written (int).
1,$ s/sprintf/_php3_sprintf/g in functions/var.c to repair this
problem.
(I also noticed the same problem in interbase.c, though I don't use
that module myself. The fix is left as an exercise for the reader :)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=2033&edit=1