axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milinda Pathirage" <milinda.pathir...@gmail.com>
Subject Re: Memory leak in mod_axis2?
Date Wed, 16 Apr 2008 06:28:45 GMT
Hi,
I think the hack samisa proposed earlier is not working, because we didn't
include any header files specific to guththila inside axiom code which
related to om_stax_builder.c. If we include it in axiom_xml_reader.h, it
worked well. But this hack is not acceptable due to it parser specific code
inside axiom code (other than wrappers). Is there any specific '#define' for
libxml. If we have one we can change the current code to check whether
libxml is enabled, or we can simple define AXIS2_ENABLE_GUTHTHILA at
configuration.

Other than the comment handling, there are many places in om_stax_builder.c
which we have use AXIS2_GUTHTHILA_ENABLED. I think we must fix this before
1.3.1 release.

Please feel free to comment in this.

Thanks
Milinda.

On Fri, Apr 11, 2008 at 10:44 PM, Samisa Abeysinghe <samisa@wso2.com> wrote:

>
> Milinda Pathirage wrote:
>
> > Hi Alex and Samisa,
> >
> > This bug was caused by recent change of default parser. In the
> > om_stax_builder.c, we previously check whether guththila is enabled and free
> > the comment vlaue when we encounter a comment. Now guththila is default we
> > don have AXIS2_GUTHTHILA_ENABLED defined at the compile time.
> >
>
> hmm, Good point. The whole trouble is because of a design flow, how come a
> parser specific thing came to a parser independent logic? :)
>
> As an immediat efix, we can define AXIS2_GUTHTHILA_ENABLED in some
> Guththila header. However that is a hack, and not a neat fix. In the long
> run, we need to find why we have to treat comments form different parsers
> differently and fix that issue.
>
> Please raise a Jira on this.
>
> Thanks,
> Samisa...
>
>
> > #ifdef AXIS2_GUTHTHILA_ENABLED*/
> >
> >    AXIS2_FREE(env->allocator,comment_value);
> >
> > #else
> >
> >    axiom_xml_reader_xml_free(om_builder->parser,env,comment_value);
> >
> > #endif
> >
> > I changed the above lines to following
> >
> > /*#ifdef AXIS2_GUTHTHILA_ENABLED*/
> >
> >    AXIS2_FREE(env->allocator,comment_value);
> >
> > /*#else*/
> > #ifdef AXIS2_LIBXML_ENABLED
> >    axiom_xml_reader_xml_free(om_builder->parser,env,comment_value);
> >
> > #endif
> >
> > and now definitely lost: 690 bytes in 46 blocks.
> >
> > I have attached the valgrind log. I don't know the correct way to handle
> > LIBXML enabling. Please can some one change the
> > 'axiom_stax_builder_create_om_comment' function in om_stax_builder.c file to
> > reflect recent changes in default parser.
> >
> > Thanks
> > Milinda
> >
> >
> > On Thu, Apr 10, 2008 at 6:01 PM, Samisa Abeysinghe <samisa@wso2.com<mailto:
> > samisa@wso2.com>> wrote:
> >
> >    Alex,
> >      In the mean time, try with libxml2 paarser.
> >    Samisa...
> >
> >
> >    Samisa Abeysinghe wrote:
> >
> >        Samisa Abeysinghe wrote:
> >
> >
> >            Alex Bolgarov wrote:
> >
> >                On Wed, Apr 9, 2008 at 3:36 PM, Samisa Abeysinghe
> >                <samisa@wso2.com <mailto:samisa@wso2.com>> wrote:
> >
> >                    In the mean time, please send the valgrind log.
> >
> >
> >                I did send the valgrind log to the list
> >
> >
> >            Sorry, I missed it (was a bit sleepy at the time I replied
> >            ;) )
> >
> >            Looking at the log, it is a newly introduced one, with
> >            Guththila parser. I remember Lahuri mentioning about this
> >            leak once, and I was under the impression that this was
> >            fixed. Anyway I will have a look.
> >
> >
> >        I had a more detailed look into the code and there are some
> >        leaks to be fixed. I am curretly at ApacheCon and do not have
> >        access to a Linux box, and would only have time to fix this
> >        next week. Can someone please look into this in the mean time.
> >
> >        Thanks,
> >        Samisa...
> >
> >
> >
> >  ---------------------------------------------------------------------
> >        To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> >        <mailto:axis-c-user-unsubscribe@ws.apache.org>
> >        For additional commands, e-mail:
> >        axis-c-user-help@ws.apache.org
> >        <mailto:axis-c-user-help@ws.apache.org>
> >
> >
> >
> >
> >
> >    --    Samisa Abeysinghe Software Architect; WSO2 Inc.
> >
> >    http://www.wso2.com/ - "Oxygenating the Web Service Platform."
> >
> >
> >    ---------------------------------------------------------------------
> >    To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> >    <mailto:axis-c-user-unsubscribe@ws.apache.org>
> >    For additional commands, e-mail: axis-c-user-help@ws.apache.org
> >    <mailto:axis-c-user-help@ws.apache.org>
> >
> >
> >
> >
> > --
> > http://inf-dimensions.blogspot.com "Infinite Dimensions"
> > http://wsaxc.blogspot.com "Web Services With Axis2/C"
> > ------------------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-user-help@ws.apache.org
> > ------------------------------------------------------------------------
> >
> > No virus found in this incoming message.
> > Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.11/1368 -
> > Release Date: 4/9/2008 4:20 PM
> >
>
>
> --
> Samisa Abeysinghe Director, Engineering; WSO2 Inc.
>
> http://www.wso2.com/ - "The Open Source SOA Company"
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


-- 
http://inf-dimensions.blogspot.com "Infinite Dimensions"
http://wsaxc.blogspot.com "Web Services With Axis2/C"

Mime
View raw message