[ 
https://issues.apache.org/jira/browse/XERCESC-1451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902327#action_12902327
 ] 

Daniel Pinyol commented on XERCESC-1451:
----------------------------------------

Since API is not compatible, is there any migration tutorial? I only found that 
http://xerces.apache.org/xerces-c/migrate-archive-3.html#Migrateto300 , and I'm 
not sure how to migrate DomBuilder, DomWriter,...

Thanks. 

> Valgrind reports mismatched new/delete[] usage
> ----------------------------------------------
>
>                 Key: XERCESC-1451
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1451
>             Project: Xerces-C++
>          Issue Type: Bug
>    Affects Versions: 2.5.0, 2.6.0
>         Environment: Red Hat 9 (Shrike 2.4.20-6smp), Dell Precision 530
> Valgrind 2.4.0
> g++ 3.2.2
>            Reporter: Glenn Miyake
>
> Valgrind reports a mismatch new/delete[] 
> MemoryManagerImpl::allocate(unsigned) appears to allocate using just 
> new(size).
> This memory is then incorrectly freed using array delete (delete []) in 
> XMLString::release.
> Simply changing the release method to call "delete" does not work since it 
> appears that release is also used to free memory allocated with new [].
> Partial valgrind output follows:
> ==21267== Mismatched free() / delete / delete []
> ==21267==    at 0x1B903D5D: operator delete[](void*) (vg_replace_malloc.c:161)
> ==21267==    by 0x1BB0A9EC: xercesc_2_6::XMLString::release(unsigned short**) 
> (in /home/gmiyake/dev/xerces-c-src_2_6_0/lib/libxerces-c.so.26.0)
> ==21267==    by 0x836BC59: 
> altova::CDoc::convertXmlDocToString(altova::CNode&) (Doc.cpp:451)
> ==21267==    by 0x836E059: altova::CNode::convertXmlDocToString() 
> (Node.cpp:469)
> ==21267==  Address 0x1BE20C18 is 0 bytes inside a block of size 3912 alloc'd
> ==21267==    at 0x1B9036A6: operator new(unsigned) (vg_replace_malloc.c:132)
> ==21267==    by 0x1BA7C51B: 
> xercesc_2_6::MemoryManagerImpl::allocate(unsigned) (in 
> /home/gmiyake/dev/xerces-c-src_2_6_0/lib/libxerces-c.so.26.0)
> ==21267==    by 0x1BA49F0A: 
> xercesc_2_6::DOMWriterImpl::writeToString(xercesc_2_6::DOMNode const&) (in 
> /home/gmiyake/dev/xerces-c-src_2_6_0/lib/libxerces-c.so.26.0)
> ==21267==    by 0x836BC23: 
> altova::CDoc::convertXmlDocToString(altova::CNode&) (Doc.cpp:440)
> ==21267==    by 0x836E059: altova::CNode::convertXmlDocToString() 
> (Node.cpp:469)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to