C++ Standard Library
  1. C++ Standard Library
  2. STDCXX-596

purify reports uninitialized memory read in _rw_fmtarray

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: Test Driver
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Severity:
      Incorrect Behavior

      Description

      UMR: Uninitialized memory read:

      • This is occurring while in thread 26262:
        int _rw_fmtarray<char>(FmtSpec const&, Buffer&, char const*, unsigned, int) [printf.cpp:2012]
        _rw_fmtstr(FmtSpec const&, Buffer&, char const*, unsigned) [printf.cpp:2373]
        _rw_fmtllong(FmtSpec const&, Buffer&, long long) [printf.cpp:1220]
        int rw_fmtinteger<long long>(FmtSpec const&, Buffer&, long long) [printf.cpp:1237]
        _rw_fmtinteger(FmtSpec*, unsigned, Buffer&, VarArgs*) [printf.cpp:1287]
        _rw_vasnprintf_c99(FmtSpec*, unsigned, Buffer&, VarArgs*) [printf.cpp:540]
      • Reading 1 byte from 0xbfffe9f4 on the stack of thread 26262.
      • Address 0xbfffe9f4 is 28 bytes past start of local variable "buffer" in function _rw_fmtllong(FmtSpec const&, Buffer&, long long).
            • Purify instrumented ./18_ilimits (pid 26262) ****
              UMR: Uninitialized memory read:
      • This is occurring while in thread 26262:
        int _rw_fmtarray<char>(FmtSpec const&, Buffer&, char const*, unsigned, int) [printf.cpp:2012]
        _rw_fmtstr(FmtSpec const&, Buffer&, char const*, unsigned) [printf.cpp:2373]
        _rw_fmtllong(FmtSpec const&, Buffer&, long long) [printf.cpp:1220]
        int rw_fmtinteger<unsigned long long>(FmtSpec const&, Buffer&, unsigned long long) [printf.cpp:1237]
        _rw_fmtinteger(FmtSpec*, unsigned, Buffer&, VarArgs*) [printf.cpp:1370]
        _rw_vasnprintf_c99(FmtSpec*, unsigned, Buffer&, VarArgs*) [printf.cpp:540]
      • Reading 1 byte from 0xbfffe9e1 on the stack of thread 26262.
      • Address 0xbfffe9e1 is 9 bytes past start of local variable "buffer" in function _rw_fmtllong(FmtSpec const&, Buffer&, long long).
      1. stdcxx-596.patch
        0.5 kB
        Travis Vitek

        Activity

        Hide
        Travis Vitek added a comment - - edited

        2007-10-15 Travis Vitek <vitek@roguewave.com>

        STDCXX-596

        • 0.printf.cpp (_rw_fmtarray): Check pointer bounds before
          examining the contents to avoid uninitialized memory read.
        Show
        Travis Vitek added a comment - - edited 2007-10-15 Travis Vitek <vitek@roguewave.com> STDCXX-596 0.printf.cpp (_rw_fmtarray): Check pointer bounds before examining the contents to avoid uninitialized memory read.
        Show
        Farid Zaripov added a comment - Commited: http://svn.apache.org/viewvc?rev=585116&view=rev
        Hide
        Martin Sebor added a comment -

        Reported against 4.2 Set Affects Version(s) accordingly.

        Show
        Martin Sebor added a comment - Reported against 4.2 Set Affects Version(s) accordingly.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development