Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4140

Use of non-thread-safe function gmtime()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.11.0
    • Component/s: C++ - Library
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      Method THttpServer::getTimeRFC1123() (in lib/cpp/src/thr8ft/transport/THttpServer.cpp) uses gmtime().
      This function is documented to be not thread-safe (https://www.gnu.org/software/libc/manual/html_node/Broken_002ddown-Time.html).

      Instead, we should use gmtime_r().

        Attachments

        1. THRIFT-4140.patch
          0.8 kB
          Adriaan Schmidt

          Issue Links

            Activity

              People

              • Assignee:
                jking3 James E. King III
                Reporter:
                adriaan42 Adriaan Schmidt
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: