ID: 47341
User updated by: geoffers+phpbugs at gmail dot com
Reported By: geoffers+phpbugs at gmail dot com
Status: Open
Bug Type: Reproducible crash
Operating System: Debian Etch
-PHP Version: 5.2CVS-2009-02-08 (CVS)
+PHP Version: 5.3CVS-2009-02-08 (CVS)
New Comment:
Woops, should be 5.3CVS not 5.2CVS
Previous Comments:
------------------------------------------------------------------------
[2009-02-08 19:06:30] geoffers+phpbugs at gmail dot com
Description:
------------
When running PHP with zend.enable_gc=0, a segfault occurs when trying
to
call gc_collect_cycles().
This is on Debian Etch, with everything apart from PHP 5.3 from the
Debian stable repositories. PHP 5.3 was compiled with:
'./configure' '--enable-bcmath' '--enable-calendar' '--with-zlib-
dir=/usr' '--with-gd' '--with-apxs2=/usr/bin/apxs2' '--with-curl=/usr'
'--without-pear' '--enable-mbstring' '--enable-debug'
I have only tested through the CLI using -d zend.enable_gc=0.
Reproduce code:
---------------
<?php
gc_collect_cycles();
?>
Expected result:
----------------
I would expect that PHP didn't crash!
Beyond that, I'd expect the result to be the same as the following when
zend.enable_gc=1:
<?php
gc_disable();
gc_collect_cycles();
?>
which is to say that it silently fails (and returns 0).
Actual result:
--------------
Segfault:
#0 0x08449a83 in gc_mark_roots () at /root/php5/Zend/zend_gc.c:363
#1 0x0844a05e in gc_collect_cycles () at
/root/php5/Zend/zend_gc.c:539
#2 0x08439ab6 in zif_gc_collect_cycles (ht=0,
return_value=0xb79301ac, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=0)
at /root/php5/Zend/zend_builtin_functions.c:336
#3 0x084536a5 in zend_do_fcall_common_helper_SPEC
(execute_data=0xb77b8048) at /root/php5/Zend/zend_vm_execute.h:313
#4 0x084581ea in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xb77b8048) at /root/php5/Zend/zend_vm_execute.h:1564
#5 0x08452ae2 in execute (op_array=0xb79307d8) at
/root/php5/Zend/zend_vm_execute.h:104
#6 0x084286de in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /root/php5/Zend/zend.c:1181
#7 0x083bce0c in php_execute_script (primary_file=0xbfb8bce4) at
/root/php5/main/main.c:2147
#8 0x084b8e4b in main (argc=4, argv=0xbfb8be34) at
/root/php5/sapi/cli/php_cli.c:1159
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47341&edit=1