php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48405 Segmentation fault while type casting array into object
Submitted: 2009-05-27 11:00 UTC Modified: 2009-06-04 01:00 UTC
From: dharmeshm at rediff dot co dot in Assigned:
Status: No Feedback Package: Arrays related
PHP Version: 5.2.6 OS: CentOS release 3.8 (Final)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dharmeshm at rediff dot co dot in
New email:
PHP Version: OS:

 

 [2009-05-27 11:00 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-27 12:54 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-06-04 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 27 16:01:27 2024 UTC