php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46029 Segfault in DOMText when using with Reflection
Submitted: 2008-09-09 14:11 UTC Modified: 2008-09-10 15:41 UTC
From: felipe@php.net Assigned:
Status: Closed Package: DOM XML related
PHP Version: 5.2CVS, 5.3CVS, 6CVS OS: *
Private report: No CVE-ID:
 [2008-09-09 14:11 UTC] felipe@php.net
Description:
------------
See below.

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

new domtext;
print "ok!\n";

$x = new ReflectionMethod('domtext', '__construct');
$x->invoke(new domtext);
print "ok!\n";


Expected result:
----------------
ok
ok

Actual result:
--------------
==7575== Process terminating with default action of signal 11 (SIGSEGV)
==7575==  Bad permissions for mapped region at address 0x41BFAB4
==7575==    at 0x808B987: php_libxml_clear_object (libxml.c:147)
==7575==    by 0x808B9E8: php_libxml_unregister_node (libxml.c:162)
==7575==    by 0x808DDEB: php_libxml_node_free_resource (libxml.c:1008)
==7575==    by 0x80F55FC: zim_domtext___construct (text.c:96)
==7575==    by 0x83402CD: zend_call_function (zend_execute_API.c:1027)
==7575==    by 0x819DE85: zim_reflection_method_invoke (php_reflection.c:2376)
==7575==    by 0x8378AF9: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200)
==7575==    by 0x8379AE7: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==7575==    by 0x8378593: execute (zend_vm_execute.h:92)
==7575==    by 0x834F898: zend_execute_scripts (zend.c:1134)
==7575==    by 0x82E8D09: php_execute_script (main.c:2011)
==7575==    by 0x83D8C82: main (php_cli.c:1134)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-09 14:22 UTC] felipe@php.net
See also:

$x = new ReflectionMethod('domcomment', '__construct');
$x->invoke(new domcomment);
 [2008-09-10 15:41 UTC] rrichards@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-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 17:01:58 2014 UTC