axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dinesh Premalal (JIRA)" <>
Subject [jira] Commented: (AXIS2C-394) element free segfaults if namespace reused
Date Tue, 07 Nov 2006 19:20:51 GMT
    [ ] 
Dinesh Premalal commented on AXIS2C-394:

sorry ... It gives segfault with attribute also. Will open a jira.

> element free segfaults if namespace reused
> ------------------------------------------
>                 Key: AXIS2C-394
>                 URL:
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: xml/om
>    Affects Versions: 0.95
>            Reporter: Chris Darroch
>         Assigned To: Dinesh Premalal
>         Attachments: axis2c-394.patch
> If you create a namespace with axiom_namespace_create() and then create two
> sibling elements using axiom_element_create(), passing them both the namespace pointer,
> then both elements add the namespace pointer to their internal namespace hash,
> because neither finds declated it in any of the ancerstor elements.
> Then when you call axiom_node_free_tree(), you get a segfault when axiom_element_free()
> for the second element, because it calls axiom_namespace_free() on a namespace that
> the first element already freed.  Both elements treat the namespace as if it was private
> themselves and add it to their internal namespace hashes, and then both try to free it.
> I think some kind of reference counting will be required here.  I'll try to make up a
patch tonight
> and post it here.
> If I may just say so, though ... this is why trying to do alloc/free on everything is
hard!  It would
> be so much easier if you were using APR memory pools!  Then you could make lots of
> pointers (like these internal namespace hash pointers) and not worry about reference
> counting, and when you were *totally* done with everything, just clear or destroy the

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message