[
https://issues.apache.org/jira/browse/AXIS2C-1632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13640804#comment-13640804
]
Alex Mantaut edited comment on AXIS2C-1632 at 4/24/13 7:19 PM:
---------------------------------------------------------------
New interface for the hash, unifies key management and env issues, keeps
backward compatibility.
The hash now manages the memory of the keys internally (it creates a copy of
each key instead of relying on the ptr)
Also the hash keeps a copy of the environment it needs to use, and uses always
the same environment, to avoid issues with the allocator.
Also it fixes an error in the copy function of the hash, which allocated memory
incorrectly.
Includes Unit tests for the functionality.
was (Author: alexmantaut):
New interface for the hash, unifies key management and env issues, keeps
backward compatibility.
> Patch to fix Stability issues and memory leaks on hash keys
> -----------------------------------------------------------
>
> Key: AXIS2C-1632
> URL: https://issues.apache.org/jira/browse/AXIS2C-1632
> Project: Axis2-C
> Issue Type: Bug
> Components: core/engine
> Reporter: Alex Mantaut
> Labels: patch
> Attachments: axis2c-1632.patch, hash2_interface.patch
>
>
> Hash seems to keep a pointer to the keys of the elements it stores.Right now
> that memory is managed by the caller of the method... In some cases it causes
> a memory leak, but as the key memory is external to the hash it is a
> potential segfault (I think this could be related to other existing segfaults
> which are difficult to identify)
> I proposed a patch to create a copy of the key for the hash to use (the hash
> releases that memory automatically when freed)...
> I looked trough all the code to correct the calls to axutil_hash_set() in
> order to unify the memory management, and runned all the samples to check it
> worked correctly (I know hash it's used in a lot of places)
> Please review the patch to see if any changes need to be done on it...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]