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 un...@optenet.com on 2004/12/30 10:46:52 UTC
SIGSEGV deserializating arrays of complex objects
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 crash.
I suppose that there isn't an easy fix to this bug; I just delete the virtual destructor of
the mapItem stub and now it works.