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

Use of non-thread-safe function gmtime()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.10.0
    • 0.11.0
    • C++ - Library
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: