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

Incorrect format string in Windows stacktrace generator.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.12, 4.0.9, 4.1.10
    • Affects Version/s: None
    • Component/s: Logging
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v4.0, v3.6
    • 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".                

      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"

            Assignee:
            john.festa@mongodb.com John Festa
            Reporter:
            john.festa@mongodb.com John Festa
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: