#48405 [Opn->Fbk]: Segmentation fault while type casting array into object
| From: | jani@php.net | Date: | Wed, 27 May 2009 12:54:18 +0000 |
| Subject: | #48405 [Opn->Fbk]: Segmentation fault while type casting array into object | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-137775@lists.php.net to get a copy of this message | ||
ID: 48405
Updated by: jani@php.net
Reported By: dharmeshm at rediff dot co dot in
-Status: Open
+Status: Feedback
Bug Type: Arrays related
Operating System: CentOS release 3.8 (Final)
PHP Version: 5.2.6
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2009-05-27 11:00:25] dharmeshm at rediff dot co dot in
Description:
------------
While converting array into object, it gives segmentation fault.
php version 5.2.6
GDB backtrace result:
(gdb) run /home/httpd/html/wordpress/test.php
Starting program: /usr/local/bin/php
/home/httpd/html/wordpress/test.php
[Thread debugging using libthread_db enabled]
[New Thread -1218523008 (LWP 30017)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218523008 (LWP 30017)]
_zend_mm_free_int (heap=0x8b656b0, p=0x8b656b0) at
/usr/local/src/php-5.2.6/Zend/zend_alloc.c:1960
1960 if (ZEND_MM_IS_FREE_BLOCK(next_block)) {
(gdb) bt
#0 _zend_mm_free_int (heap=0x8b656b0, p=0x8b656b0) at
/usr/local/src/php-5.2.6/Zend/zend_alloc.c:1960
#1 0x08290865 in _efree (ptr=0xbfff5930) at
/usr/local/src/php-5.2.6/Zend/zend_alloc.c:2293
#2 0x0830b47a in zend_assign_to_variable (result=0xb75b7280,
op1=0xb75b773c, op2=0xb75b72e0, value=0xbfff5930, type=2, Ts=0xbfff58e0,
tsrm_ls=0x8b64280)
at /usr/local/src/php-5.2.6/Zend/zend_execute.c:764
#3 0x082f703c in ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER
(execute_data=0xbfff5970, tsrm_ls=0x8b64280) at
/usr/local/src/php-5.2.6/Zend/zend_vm_execute.h:21437
#4 0x082c07c2 in execute (op_array=0xb75b6f20, tsrm_ls=0x8b64280) at
/usr/local/src/php-5.2.6/Zend/zend_vm_execute.h:92
#5 0x082a7a4e in zend_execute_scripts (type=8, tsrm_ls=0x8b64280,
retval=0x0, file_count=3) at /usr/local/src/php-5.2.6/Zend/zend.c:1134
#6 0x0826e4ed in php_execute_script (primary_file=0xbfff7d10,
tsrm_ls=0x8b64280) at /usr/local/src/php-5.2.6/main/main.c:2005
#7 0x0830d0c2 in main (argc=2, argv=0xbfff7df4) at
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1140
(gdb) frame 2
#2 0x0830b47a in zend_assign_to_variable (result=0xb75b7280,
op1=0xb75b773c, op2=0xb75b72e0, value=0xbfff5930, type=2, Ts=0xbfff58e0,
tsrm_ls=0x8b64280)
at /usr/local/src/php-5.2.6/Zend/zend_execute.c:764
764 zval_ptr_dtor(&value);
Reproduce code:
---------------
$wp_taxonomies['category'] = (object) array('name' => 'category',
'object_type' => 'post', 'hierarchical' => true,
'update_count_callback'
=> '_update_post_term_count');
Actual result:
--------------
segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48405&edit=1