You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Dimuthu Gamage (JIRA)" <ji...@apache.org> on 2008/03/15 07:28:24 UTC

[jira] Resolved: (AXIS2C-1055) Double free in generated ADB code

     [ https://issues.apache.org/jira/browse/AXIS2C-1055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dimuthu Gamage resolved AXIS2C-1055.
------------------------------------

    Resolution: Fixed

I just fixed the problem, as you suggested it was due to the freeing of the incorrect variables,

Similarly I fixed a double freeing occurs when serializing an array,
For an example, the problem was in the code similar to this,

<CODE>
start_input_string = AXIS2_MALLOC(..);

for(i = 0; i < count; i ++)
{
   .....
  AXIS2_FREE( .., start_input_string)
}
</CODE>

corrected to 

<CODE>
start_input_string = AXIS2_MALLOC(..);

for(i = 0; i < count; i ++)
{
   .....
}
AXIS2_FREE( .., start_input_string);
</CODE>

Both issues are fixed in the SVN.

> Double free in generated ADB code
> ---------------------------------
>
>                 Key: AXIS2C-1055
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1055
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation
>    Affects Versions: Current (Nightly)
>            Reporter: Sam Meder
>
> I'm getting core dumps due to code generated from the latest nightlies. I've tracked it down to what I believe is a bad free. On line 4065 of CADBBeanTemplateSource.xsl there is the following code:
>                            <xsl:if test="$anon or $istype">
>                            axutil_stream_write(stream, env, start_input_str, start_input_str_len);
>                            AXIS2_FREE(env->allocator,end_input_str);
>                            </xsl:if>
> I believe that should be 
>                           <xsl:if test="$anon or $istype">
>                            axutil_stream_write(stream, env, start_input_str, start_input_str_len);
>                            AXIS2_FREE(env->allocator,start_input_str);
>                            </xsl:if>

-- 
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: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org