Uploaded image for project: 'OpenSAML - C++'
  1. OpenSAML - C++
  2. CPPOST-49

Memory leak in opensaml::saml2::SubjectConfirmationImpl::setMethod()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: SAML 2
    • Labels:
      None
    • Operating System:
      Linux
    • CPU Type:
      x86_64
    • C/C++ Compiler:
      GCC 4.x

      Description

      valgrind reports this definite memory leak:

      ==11190== 76 bytes in 1 blocks are definitely lost in loss record 57 of 83
      ==11190== at 0x4A05974: operator new(unsigned long) (vg_replace_malloc.c:220)
      ==11190== by 0x3D9BFCDC6B: xercesc_3_0::MemoryManagerImpl::allocate(unsigned long) (in /usr/lib64/libxerces-c-3.0.so)
      ==11190== by 0x5A4BC2D: xmltooling::AbstractXMLObject::prepareForAssignment(unsigned short*, unsigned short const*) (XMLString.hpp:1558)
      ==11190== by 0x50888A9: opensaml::saml2::SubjectConfirmationImpl::setMethod(unsigned short const*) (Assertions20Impl.cpp:785)
      ==11190== by 0x5A5E130: xmltooling::AbstractXMLObjectUnmarshaller::unmarshallAttributes(xercesc_3_0::DOMElement const*) (AbstractXMLObjectUnmarshaller.cpp:156)
      ==11190== by 0x5A5DC3A: xmltooling::AbstractXMLObjectUnmarshaller::unmarshall(xercesc_3_0::DOMElement*, bool) (AbstractXMLObjectUnmarshaller.cpp:66)
      ==11190== by 0x5A51D48: xmltooling::XMLObjectBuilder::buildFromElement(xercesc_3_0::DOMElement*, bool) const (XMLObjectBuilder.cpp:57)
      ...

      which appears to stem from the declaration

      IMPL_STRING_ATTRIB(Method);

      in Assertions20Impl.cpp

      There is also a similar leak reported in Protocols20Impl.cpp.

      I'm not sure if this is a bug in opensaml or xmltooling, but I've raised it under opensaml for the moment.

        Attachments

          Activity

            People

            Assignee:
            cantor.2@osu.edu Scott Cantor
            Reporter:
            chriscard Chris Card
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: