axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimuthu Gamage (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2C-1305) error not set when memory allocation fails in axis2_stub_start_op_... generated code
Date Wed, 03 Dec 2008 12:27:44 GMT

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

Dimuthu Gamage resolved AXIS2C-1305.
------------------------------------

    Resolution: Fixed

Fixed. Thanks patrick

> error not set when memory allocation fails in axis2_stub_start_op_... generated code
> ------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-1305
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1305
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation
>    Affects Versions: Current (Nightly)
>         Environment: Win
>            Reporter: Patrick van Beem
>            Priority: Minor
>             Fix For: Current (Nightly)
>
>         Attachments: mem-error.diff
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In the axis2_stub_start_op_... generated code, the error fields are not set when memory
allocation fails. The using code will assume the call succeeded because no error is set, while
it actually failed (although out-of-mem is hopefully a rare situation). 
> See example code from the calculator example:
>          void AXIS2_CALL
>          axis2_stub_start_op_Calculator_add( axis2_stub_t *stub, const axutil_env_t *env,
>             :
>             :
>             callback_data = (struct axis2_stub_Calculator_add_callback_data*) AXIS2_MALLOC(env->allocator,

>                                     sizeof(struct axis2_stub_Calculator_add_callback_data));
>             if(NULL == callback_data)
>             {
>                 AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
 //  <=== This line was not there!
>                 AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "Can not allocate memeory
for the callback data structures");
>                 return;
>             }

-- 
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


Mime
View raw message