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

purify reports uninitialized memory read in _rw_get_char

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.3.0
    • Component/s: Test Driver
    • Labels:
      None
    • Severity:
      Incorrect Behavior

      Description

      ****  Purify instrumented ./21.string.access (pid 2878)  ****
      UMR: Uninitialized memory read:
        * This is occurring while in thread 2878:
          _rw_get_char(char const*, char const**, unsigned*) [char.cpp:562]
          rw_match(char const*, char const*, unsigned) [char.cpp:816]
           test_access<char, std::char_traits<char>, std::allocator<char> >(char, std::char_traits<char>*, char*, StringFunc const&, StringTestCase const&) [21.string.access.cpp:274]
          test_access(StringFunc const&, StringTestCase const&) [21.string.access.cpp:317]
          _rw_test_case(StringFunc const&, StringTestCase const&,   (*)(StringFunc const&, StringTestCase const&)) [21.strings.cpp:1298]
          _rw_run_cases(StringFunc const&, StringTest const&) [21.strings.cpp:1353]
        * Reading 1 byte from 0x8182256 in the heap.
        * Address 0x8182256 is 14 bytes into a malloc'd block at 0x8182248 of 46 bytes.
        * This block was allocated from thread -1207973632:
          malloc         [rtlib.o]
          operator new(unsigned) [libstd15d.so]
          __rw::__rw_allocate(unsigned, int) [memory.cpp:53]
          std::allocator<char>::allocate(unsigned,  const*) [_allocator.h:144]
          std::string<char, std::char_traits<char>, std::allocator<char>>::_C_get_rep(unsigned, unsigned) [string.cc:102]
          std::string<char, std::char_traits<char>, std::allocator<char>>::string<char, std::char_traits<char>, std::allocator<char>>[not-in-charge](char const*, unsigned, std::allocator<char> const&) [string.cc:180]
      
      ****  Purify instrumented ./21.string.access (pid 2878)  ****
      UMR: Uninitialized memory read:
        * This is occurring while in thread 2878:
          _rw_get_char(char const*, char const**, unsigned*) [char.cpp:562]
          rw_match(char const*, char const*, unsigned) [char.cpp:816]
           test_access<char, UserTraits<char>, std::allocator<char> >(char, UserTraits<char>*, char*, StringFunc const&, StringTestCase const&) [21.string.access.cpp:274]
          test_access(StringFunc const&, StringTestCase const&) [21.string.access.cpp:317]
          _rw_test_case(StringFunc const&, StringTestCase const&,   (*)(StringFunc const&, StringTestCase const&)) [21.strings.cpp:1298]
          _rw_run_cases(StringFunc const&, StringTest const&) [21.strings.cpp:1353]
        * Reading 1 byte from 0x818d5a6 in the heap.
        * Address 0x818d5a6 is 14 bytes into a malloc'd block at 0x818d598 of 46 bytes.
        * This block was allocated from thread -1207973632:
          malloc         [rtlib.o]
          operator new(unsigned) [libstd15d.so]
          __rw::__rw_allocate(unsigned, int) [memory.cpp:53]
          std::allocator<char>::allocate(unsigned,  const*) [_allocator.h:144]
          std::basic_string<char, std::char_traits<char>, std::allocator<char>><char, UserTraits<char>, std::allocator<char> >::_C_get_rep(unsigned, unsigned) [string.cc:102]
          std::basic_string<char, std::char_traits<char>, std::allocator<char>><char, UserTraits<char>, std::allocator<char> >::basic_string<char, std::char_traits<char>, std::allocator<char>>[not-in-charge](char const*, unsigned, std::allocator<char> const&) [string.cc:180] 
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 2h Original Estimate - 2h
                2h
                Remaining:
                Time Spent - 4h Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - 4h Remaining Estimate - 4h
                4h