Thanks Vitaly for your response. Yes, ValueVectorOf is used in my code.
Since ValueVectorOf is exposed to the user application (same as it was before in 1.5.1 version) and its template implementation, it should work for all types (trivial and non-trivial). Thanks, Santosh Kalsangrah -----Original Message----- From: Vitaly Prapirny [mailto:m...@mebius.net] Sent: Friday, December 20, 2013 3:46 PM To: c-users@xerces.apache.org Subject: Re: ValueVectorOf implementation: 1.5.1 Vs 3.1.1 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 > > ________________________________ NOTE: This message may contain information that is confidential, proprietary, privileged or otherwise protected by law. The message is intended solely for the named addressee. If received in error, please destroy and notify the sender. Any use of this email is prohibited when received in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.