Hi,
This should be a bug if ValueVectorOf is intended for types with
non-trivial constructor implementation. But as I can see in xerces
sources, ValueVectorOf is used internally to store plain types (int,
pointers etc.) So there is no need to call type constructor. Constructor
parameter toCallDestructor may be misleading, but it is never used with
the true value.
Am I right that you mean ValueVectorOf is used in your code, not in the
xerces code?
Good luck!
Vitaly
Santosh Kalsangrah wrote:
Hi There,
I am observing crashes in my application when I changed it to use 3.1.1 version
of xerces (from xerces 1.5.1 version).
After analyzing I observed that implementation of ValueVectorOf is changed. The
constructor of ValueVectorOf is allocating required memory. This memory is
allocated using fMemoryManager->allocate. This constructor is memsetting
allocated memory to 0. But it is prohibiting the invocation of constructor of the
type ValueVectorOf used for. This is leaving all the objects uninitialized and
hence the segmentation fault.
Previous implementation used to call new TElem[size] which used to cause
invocation of constructor of type ValueVectorOf used for.
FYI, my application is C++ based application running on Linux.
I think this is a bug. Constructor should be called.
Comments?
Thanks,
Santosh Kalsangrah