Re: Segfault in HEAD & PHP_4_3 (and possible patch)
| From: | Wez Furlong | Date: | Wed, 24 Sep 2003 19:18:28 +0000 |
| Subject: | Re: Segfault in HEAD & PHP_4_3 (and possible patch) | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-4569@lists.php.net to get a copy of this message | ||
The memory manager will deliberately segfault if an allocation fails in a debug
build.
Having said that, your patch seems ok anyway.
--Wez.
On Wed, 24 Sep 2003, Antony Dovgal wrote:
> Hi, all!
>
> This script (you need to compile PHP with --enable-memory-limit first):
> <?
> ini_set("memory_limit",0);
> phpinfo();
> ?>
> produces for me segfault with last HEAD and PHP_4_3 branch.
>
> Backtrace:
>
> Program received signal SIGSEGV, Segmentation fault.
> _efree (ptr=0x0) at /root/CVS/php-src/Zend/zend_alloc.c:257
> 257 CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p->size);
> (gdb) bt
> #0 _efree (ptr=0x0) at /root/CVS/php-src/Zend/zend_alloc.c:257