You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Bill Blough (JIRA)" <xe...@xml.apache.org> on 2015/05/02 06:15:08 UTC

[jira] [Created] (XERCESC-2049) memcpy used on overlapping memory regions causes sanity test failure

Bill Blough created XERCESC-2049:
------------------------------------

             Summary: memcpy used on overlapping memory regions causes sanity test failure
                 Key: XERCESC-2049
                 URL: https://issues.apache.org/jira/browse/XERCESC-2049
             Project: Xerces-C++
          Issue Type: Bug
          Components: Utilities
    Affects Versions: 3.1.2
         Environment: Debian unstable (sid) and Debian stable (jessie) on amd64
            Reporter: Bill Blough


On Debian Jessie (libc6 2.19, libstdc++ 4.9.2) and newer, sanityTest.pl fails its tests of XMLString::collapseWS.

Tracing with GDB shows that XMLString::moveChars is corrupting the string.  I think this is likely due to memcpy being used on overlapping memory regions.

Replacing the memcpy in  moveChars with memmove fixes the issue on my systems.  






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org