Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40131

Incorrect format string in Windows stacktrace generator.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.12, 4.0.9, 4.1.10
    • Component/s: Logging
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0, v3.6
    • Steps To Reproduce:
      Hide

      The format string passed to _snprintf is "0x%llux". The 'u' and 'x' are mutally exclusive. Since the output is expected to be a hexadecimal number, the correct string is "0x%llx".

       
       
       
       
       
       
       
       

      Show
      The format string passed to _snprintf is "0x%llux". The 'u' and 'x' are mutally exclusive. Since the output is expected to be a hexadecimal number, the correct string is "0x%llx".                

      Description

      The following line reports incorrect stacktrace information due to an incorrect formatting string.

      src/mongo/util/stacktrace_windows.cpp:224

      _snprintf(symbolOffset.get(), bufferSize, "+"0x%llux", displacement64);

      The format string should be "0x%llx"

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: