axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Damitha Kumarage (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2C-73) Double deletion in releasing memory in wsdl_component struct
Date Mon, 27 Feb 2006 06:47:55 GMT
     [ http://issues.apache.org/jira/browse/AXIS2C-73?page=all ]
     
Damitha Kumarage resolved AXIS2C-73:
------------------------------------

    Resolution: Fixed

Introduced a property where free function and property value is set. 
Now in component proerpty class free the property class which
in turn free the property value using the registered free function.
in property class we also set the scope. so using the scope of 
property it can decide to free the value

> Double deletion in releasing memory in wsdl_component struct
> ------------------------------------------------------------
>
>          Key: AXIS2C-73
>          URL: http://issues.apache.org/jira/browse/AXIS2C-73
>      Project: Axis2-C
>         Type: Bug
>   Components: wsdl
>     Versions: M0.4
>     Reporter: Samisa Abeysinghe
>     Assignee: Damitha Kumarage

>
> When there are multiple services, the modules desc pointers are set as properties in
wsdl_component struct.
> When conf free is called, the multiple services try to free the same module desc pointer.
(see following  trace)
> This happens because of the way we handle properties in wsdl_component with a callback
to free memory.
> We have to tidy this up to make sure we release the memory as well as do not do that
multiple times to the same pointer.
> The better way to handle this is to use a "property" struct and store those properties
in the hash of wsdl_component.
> the property would look like
> struct property
> {
>     void *value; /*defaults to NULL*/
>     axis2_scope_t scope; /*defaults to local, mening we have to free this here*/
>     free_callback_fn_ptr; /*defaults to NULL, if null and scope is local, then use AXIS2_FREE*/
> }
> ==18138== Invalid read of size 4
> ==18138==    at 0x1B979B14: axis2_module_desc_free (module_desc.c:294)
> ==18138==    by 0x1B979DF4: axis2_module_desc_array_list_free (module_desc.c:350)
> ==18138==    by 0x1B93EFD8: axis2_wsdl_component_free (wsdl_component.c:183)
> ==18138==    by 0x1B93DF87: axis2_wsdl_svc_free (wsdl_svc.c:169)
> ==18138==    by 0x1B975571: axis2_svc_free (svc.c:543)
> ==18138==    by 0x1B97C945: axis2_svc_grp_free (svc_grp.c:287)
> ==18138==    by 0x1B95FE2D: axis2_conf_free (conf.c:604)
> ==18138==    by 0x1B9AF35F: axis2_call_free (call.c:291)
> ==18138==    by 0x1B9B33A7: axis2_stub_free (stub.c:342)
> ==18138==    by 0x804946E: main (math_client.c:141)
> ==18138==  Address 0x1BA735C8 is 24 bytes inside a block of size 28 free'd
> ==18138==    at 0x1B909743: free (vg_replace_malloc.c:152)
> ==18138==    by 0x1B979BE1: axis2_module_desc_free (module_desc.c:316)
> ==18138==    by 0x1B979DF4: axis2_module_desc_array_list_free (module_desc.c:350)
> ==18138==    by 0x1B93EFD8: axis2_wsdl_component_free (wsdl_component.c:183)
> ==18138==    by 0x1B93DF87: axis2_wsdl_svc_free (wsdl_svc.c:169)
> ==18138==    by 0x1B975571: axis2_svc_free (svc.c:543)
> ==18138==    by 0x1B97C945: axis2_svc_grp_free (svc_grp.c:287)
> ==18138==    by 0x1B95FE2D: axis2_conf_free (conf.c:604)
> ==18138==    by 0x1B9AF35F: axis2_call_free (call.c:291)
> ==18138==    by 0x1B9B33A7: axis2_stub_free (stub.c:342)
> ==18138==    by 0x804946E: main (math_client.c:141)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message