axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nadir amra (JIRA)" <>
Subject [jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements
Date Tue, 18 Oct 2005 05:57:45 GMT
    [ ] 

nadir amra commented on AXISCPP-343:

OK, I am currently testing a fix that seems to be working.  Will put into repository tomorrow
if further testing does not come up with anything.

My solution was to generate a reset() method that contains the code that was originally in
the constructor.  The constructor now calls reset().  

So when arrays are made bigger, the generated code now looks like the following (taking AxisBench
as an example):

			BenchBasicDataType* pNew = new BenchBasicDataType[nSize];
			size_t i = nSize/2;
			for (int ii=0; ii<i; ++ii)
				pNew[ii] = pObj[ii];
			delete [] pObj;
			return pNew;

This performs bitwise-copies of data items, then resets the copied object so that the fields
in the source array are reinitialized in the same way as when the object is instantiated.

Let me know if you see any wholes...and I will let you know when I commit the code to the

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>          Key: AXISCPP-343
>          URL:
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message