From:             wjs at 42virtual dot com
Operating system: SUSE 8.2
PHP version:      4.3.2
PHP Bug Type:     DOM XML related
Bug description:  Segmentation Fault in Function node_list_wrapper_dtor

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 bug report at http://bugs.php.net/?id=24219&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=24219&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=24219&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24219&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24219&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24219&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24219&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24219&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24219&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24219&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24219&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24219&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24219&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24219&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24219&r=gnused

Reply via email to