ID:               27467
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ds at cyberspace dot co dot za
-Status:           Assigned
+Status:           Closed
 Bug Type:         DOM XML related
 Operating System: WinXP
 PHP Version:      5CVS-2004-03-02 (dev)
 Assigned To:      rrichards
 New Comment:

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.




Previous Comments:
------------------------------------------------------------------------

[2004-03-02 14:59:28] [EMAIL PROTECTED]

Verified on Linux, backtrace follows. Also assigned to Rob (looks like
a double free to me somewhere).



0x0808af07 in dom_get_doc_props (document=0x845a5a5a)

    at /dat/dev/php/php-5.0dev/ext/dom/php_dom.c:119

119             if (document && document->doc_props) {

(gdb) bt

#0  0x0808af07 in dom_get_doc_props (document=0x845a5a5a)

    at /dat/dev/php/php-5.0dev/ext/dom/php_dom.c:119

#1  0x08092e96 in dom_document_parser (id=0x40562b08, mode=1,

    source=0x40560470 "file.xsl")

    at /dat/dev/php/php-5.0dev/ext/dom/document.c:1390

#2  0x0809319e in dom_parse_document (ht=1, return_value=0x4056057c,

    this_ptr=0x40562b08, return_value_used=1, mode=1)

    at /dat/dev/php/php-5.0dev/ext/dom/document.c:1497

#3  0x08093312 in zif_domdocument_load (ht=1, return_value=0x4056057c,

    this_ptr=0x40562b08, return_value_used=1)

    at /dat/dev/php/php-5.0dev/ext/dom/document.c:1536

#4  0x082ab827 in execute_internal (execute_data_ptr=0xbfffd300,

    return_value_used=1) at
/dat/dev/php/php-5.0dev/Zend/zend_execute.c:1290

#5  0x4075afa3 in xdebug_execute_internal
(current_execute_data=0xbfffd300,

    return_value_used=1) at /dat/dev/php/xdebug/xdebug.c:895

#6  0x082af124 in zend_do_fcall_common_helper
(execute_data=0xbfffd300,

    opline=0x40561774, op_array=0x40562860)

    at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2650

#7  0x082af708 in zend_do_fcall_by_name_handler
(execute_data=0xbfffd300,

    opline=0x40561774, op_array=0x40562860)

    at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2759

#8  0x082ab956 in execute (op_array=0x40562860)

    at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:1339

---Type <return> to continue, or q <return> to quit---

#9  0x4075ae5a in xdebug_execute (op_array=0x40562860)

    at /dat/dev/php/xdebug/xdebug.c:863

#10 0x082af287 in zend_do_fcall_common_helper
(execute_data=0xbfffd550,

    opline=0x4055ff34, op_array=0x4055fa9c)

    at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2677

#11 0x082af708 in zend_do_fcall_by_name_handler
(execute_data=0xbfffd550,

    opline=0x4055ff34, op_array=0x4055fa9c)

    at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2759

#12 0x082ab956 in execute (op_array=0x4055fa9c)

    at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:1339

#13 0x4075ae5a in xdebug_execute (op_array=0x4055fa9c)

    at /dat/dev/php/xdebug/xdebug.c:863

#14 0x08288e9b in zend_execute_scripts (type=8, retval=0x0,
file_count=3)

    at /dat/dev/php/php-5.0dev/Zend/zend.c:1041

#15 0x08244940 in php_execute_script (primary_file=0xbffff9e0)

    at /dat/dev/php/php-5.0dev/main/main.c:1650

#16 0x082b816d in main (argc=1, argv=0xbffffa74)

    at /dat/dev/php/php-5.0dev/sapi/cli/php_cli.c:941

(gdb)





------------------------------------------------------------------------

[2004-03-02 14:48:39] ds at cyberspace dot co dot za

Description:
------------
Calling domDocument::load() from within a class method PHP crashes.

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



class docLoader {

  public function __construct($xslFile) {

    $xsltDoc = domDocument::load($xslFile);

  }

}



$doc = new docLoader('file.xsl'); // does not work



// however



$xsltDoc = domDocument::load('file.xsl'); // still works



?>

Expected result:
----------------
Should return object

Actual result:
--------------
Both PHP CLI and Apache module crash.  Only when domDocument::load() is
called from a class method.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27467&edit=1

Reply via email to