php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46087 DOMXPath - segfault when trying to clone object
Submitted: 2008-09-15 19:19 UTC Modified: 2008-09-16 00:39 UTC
From: felipe@php.net Assigned:
Status: Closed Package: DOM XML related
PHP Version: 5.3CVS-2008-09-15 (CVS) OS:
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: felipe@php.net
New email:
PHP Version: OS:

 

 [2008-09-15 19:19 UTC] felipe@php.net
Description:
------------
See below.

Reproduce code:
---------------
<?php

$x = new domxpath(new domdocument); 
clone $x;


Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1228761392 (LWP 12206)]
zend_hash_destroy (ht=0x0) at /home/felipe/dev/php5/Zend/zend_hash.c:521
521             p = ht->pListHead;
(gdb) bt
#0  zend_hash_destroy (ht=0x0) at /home/felipe/dev/php5/Zend/zend_hash.c:521
#1  0x080c5177 in dom_xpath_objects_free_storage (object=0x8a21400, tsrm_ls=0x8871070) at /home/felipe/dev/php5/ext/dom/php_dom.c:968
#2  0x083d6379 in zend_objects_store_del_ref_by_handle_ex (handle=2, handlers=0x8870540, tsrm_ls=0x8871070) at /home/felipe/dev/php5/Zend/zend_objects_API.c:215
#3  0x083d63d7 in zend_objects_store_del_ref (zobject=0x8a207ec, tsrm_ls=0x8871070) at /home/felipe/dev/php5/Zend/zend_objects_API.c:171
#4  0x083b39c9 in _zval_dtor_func (zvalue=0x8a207ec) at /home/felipe/dev/php5/Zend/zend_variables.c:52
#5  0x083a6b59 in _zval_ptr_dtor (zval_ptr=0x8a52d20) at /home/felipe/dev/php5/Zend/zend_variables.h:35
#6  0x083da01e in ZEND_CLONE_SPEC_CV_HANDLER (execute_data=0x8a52c40, tsrm_ls=0x8871070) at /home/felipe/dev/php5/Zend/zend_vm_execute.h:22416
#7  0x083d9763 in execute (op_array=0x8a20bfc, tsrm_ls=0x8871070) at /home/felipe/dev/php5/Zend/zend_vm_execute.h:104
#8  0x083a773d in zend_eval_string (str=0xbfdeaa51 "$x = new domxpath(new domdocument); clone $x;", retval_ptr=0x0, string_name=0x88510af "Command line code", tsrm_ls=0x8871070)
    at /home/felipe/dev/php5/Zend/zend_execute_API.c:1110
#9  0x083a78e7 in zend_eval_string_ex (str=0xbfdeaa51 "$x = new domxpath(new domdocument); clone $x;", retval_ptr=0x0, string_name=0x88510af "Command line code", handle_exceptions=1, tsrm_ls=0x8871070)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-16 00:39 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 14:01:29 2024 UTC