ID:               24219
 User updated by:  wjs at 42virtual dot com
 Reported By:      wjs at 42virtual dot com
 Status:           Open
 Bug Type:         DOM XML related
 Operating System: SUSE 8.2
 PHP Version:      4.3.2
 New Comment:

The variable node is of tpye xmlNodePtr whereas node->properties is of
xmlAttr.

Can this be a big /litte endian problem?


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

[2003-06-17 03:00:46] wjs at 42virtual dot com

Description:
------------
We are getting not steadily reproducable segmentation fault in this
function. From one recursive Call to the other it appears the a
NULL-Pointer (in node) is somehow casted to 0xffff0000. We suspect that
this might be a casting problem between xmlNodePtr and xmlAttr


/*      destroyref is a bool indicating if all registered objects for nodes

        within the tree should be destroyed */
static inline void node_list_wrapper_dtor(xmlNodePtr node, int
destroyref TSRMLS_DC)
{
        while (node != NULL) {
                node_list_wrapper_dtor(node->children, destroyref TSRMLS_CC);
                switch (node->type) {
                        /* Skip property freeing for the following types */
                        case XML_ATTRIBUTE_DECL:
                        case XML_DTD_NODE:
                        case XML_ENTITY_DECL:
                        case XML_ATTRIBUTE_NODE:
                                break;
                        default:
                                /*      Attribute Nodes contain accessible children
                                        Call this function with the propert list
                                attr_list_wrapper_dtor(node->properties);  */
                                node_list_wrapper_dtor((xmlNodePtr) node->properties, 
destroyref
TSRMLS_CC);
                }

                if (destroyref == 1) {
                        node_wrapper_free(node TSRMLS_CC);
                } else {
                        node_wrapper_dtor(node);
                }

                node = node->next;
        }
}




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


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

Reply via email to