axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <sam...@wso2.com>
Subject Re: |AXIS2] [AXIS2C] c-stubs: memset in axis2_<TYPE>_create missing
Date Fri, 22 Jun 2007 02:10:52 GMT
Dr. Florian Steinborn wrote:
> For more safety it would be desirable if the generation would add the 
> memset() call. 
+1 for calling memset(). Please raise a Jira on this.
> I did not initialize every field of the structure before returning it 
> and the service crashed (with the server), when it tried to return the 
> values. In that the generated function axis2_Date_serialize() is 
> called. This function has a problem, as it tries to print (with 
> sprintf()) all the numeric members of the Dat-struct into 64-bytes 
> memory blocks. Printing a double with sprintf() this way into a 
> 64-byte array will most likely crash, especially with uninitialized 
> memory, as the resulting string will be longer than 64 bytes.
To figure out the exact problem, I would like to codegen and see. Would 
it be possible to send the WSDL file you are using? (if it is OK to make 
it public only)
>
> Unfortunately the user cannot call the memset himself after calling 
> the constructor as the real length of the type is hidden in the 
> module. I myself now know that I have to call the setter method for 
> each member of a new struct.
Calling setter for all members not an elegant solution. We got to do the 
memset fix in the codegen code.

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


-- 
Samisa Abeysinghe : http://www.wso2.org/ (WSO2 Oxygen Tank - Web Services Developers' Portal)


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