Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-2049

memcpy used on overlapping memory regions causes sanity test failure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.2
    • 3.2.0, 3.1.3
    • Utilities
    • None
    • Debian unstable (sid) and Debian stable (jessie) on amd64

    Description

      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.

      Attachments

        1. moveChars_overlap.diff
          0.4 kB
          Bill Blough

        Issue Links

          Activity

            People

              amassari Alberto Massari
              billblough Bill Blough
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: