axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Senaka Fernando" <sen...@wso2.com>
Subject Re: Axis2/C Memory Leaks
Date Tue, 20 Nov 2007 02:44:33 GMT
Hi Edward,

I've recently being fixing memory leaks in Axis2/C (using libxml2 parser).
As far as I know, all the samples that we have do free all the resources
before they exit, when the latest fixes would be done in 1.2.0. I haven't
tried any generated code by the WSDL2C tool however, to see whether they
do the freeing properly.

*** If you could take a look at how the "echo" sample [axis2/c/samples] is
implemented in both client and server sides, it should help. ***

Please note that there are some "still reachable blocks" when you valgrind
and I'm not sure whether it is a valgrind issue with glibc, or whether it
is a dangling pointer, but there are no definite losses or indirect losses
at the moment. Somebody correct me if I have made a wrong conclusion.

On the other hand, there are still quite a number of leaks when you use
the Guththila parser, which we are looking forward to fix.

If you believe that the code generated by the codegen tool, lacks the
freeing of memory, as in the samples that are provided, please feel free
to raise an issue at the JIRA, and propose a patch.

N.B. I'm not sure whether all the patches that I proposed are reflected on
the current svn. But, I'm pretty sure that they would be, with the Axis2/C
1.2.0 release.

Regards,
Senaka

> Hi,
>
> I am designing some web service client code using the Axis2/C framework
> (used WSDL2C to generate client stubs that call the framework).  I have
> a separate executable C file (C file that a main()) that calls the stub.
> When I ran valgrind initially on it, I saw many memory leaks from this;
> 49 loss records to be exact.  However, after inserting axis2_stub_free
> and axutil_env_free before my end return statement in my executable C
> file, I noticed that the loss records decreased greatly to 5.  I noticed
> that this freeing of the stub and env variables is not in the sample
> client code.  Should the sample client code also demonstrate this
> freeing, and is this freeing logical to do on the client side?  Also, I
> did some initial tests on the server side and noticed many memory leaks
> as well.  Should this client-side freeing be also implemented on my
> server code, or is the server-side freeing done differently and how if
> anyone can describe where to insert the freeing statements?
>
> Thanks,
> Edward
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message