Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-587

purify reports memory leak from __rw_tmpbuf in 20.temp.buffer.mt

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: Tests
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Severity:
      Resource Leak

      Description

      Each test thread iterates some number of times switching on a counter. If the last iteration runs one of the allocation functions, the temporary buffer will not be deallocated when the thread exits.

      Purify: Searching for all memory leaks...

      Memory leaked: 42 bytes (6.98%); potentially leaked: 0 bytes (0%)

      MLK: 24 bytes leaked at 0x81089d0

      • This memory was allocated from:
        malloc [rtlib.o]
        operator new(unsigned) [libstd15d.so]
        _rw::_rw_allocate(unsigned, int) [memory.cpp:53]
        __rw_tmpbuf [tmpbuf.cpp:115]
        std::pair<long long*, int > std::get_temporary_buffer<long long, int >(int, long long*) [_rawiter.h:138]
        std::pair<long long*, int > std::get_temporary_buffer<long long>(int) [_rawiter.h:153]

      MLK: 18 bytes leaked at 0x8108a38

      • This memory was allocated from:
        malloc [rtlib.o]
        operator new(unsigned) [libstd15d.so]
        _rw::_rw_allocate(unsigned, int) [memory.cpp:53]
        __rw_tmpbuf [tmpbuf.cpp:115]
        std::pair<short*, int > std::get_temporary_buffer<short, int >(int, short*) [_rawiter.h:138]
        std::pair<short*, int > std::get_temporary_buffer<short>(int) [_rawiter.h:153]

        Attachments

        1. stdcxx-587.patch
          1 kB
          Travis Vitek

          Activity

            People

            • Assignee:
              vitek Travis Vitek
              Reporter:
              vitek Travis Vitek
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: