[ 
https://issues.apache.org/jira/browse/SANDESHA2C-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537196
 ] 

Manjula Peiris commented on SANDESHA2C-10:
------------------------------------------

when uncomment above mentioned  axis2_free_thread_env(thread_env); a segfault 
occurs because sandesha2_sender worker try to use an env which was recently 
freed from that function. This env is set as member inside axutil_hash_make(). 
So when sandesha2_sender_worker tries to access the axis2_ctx propery map this 
env is already freed. I fixed this by adding a ref count to axutil_env struct. 
When this env is set as a member inside axutil_hash the ref count is 
incremented. So axis2_free_thread_env(thread_env) frees this only if the ref 
count is 0. And inside axutil_hash_t the env is freed if ref count is 0. so no 
memory leak will occur due to the fix.

Due to the recent changes AXIS2_SVC_SKELETON_FREE is now not called inside 
raw_xml_in_out_msg_recv.c. Instead it is now called inside svc_skeleton.And it 
is not commented.

> Temporary commented lines to axis2c code to get sandesha2 working
> -----------------------------------------------------------------
>
>                 Key: SANDESHA2C-10
>                 URL: https://issues.apache.org/jira/browse/SANDESHA2C-10
>             Project: Sandesha2/C
>          Issue Type: Task
>            Reporter: Damitha Kumarage
>
> I had to comment 
> AXIS2_SVC_SKELETON_FREE of receivers/raw_xml_in_out_msg_recv.c and
> axis2_free_thread_env(thread_env); of receiver/http_svr_thread.c

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to