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

Using clang-3.8 and ThreadSanitizer on the concurrency_test claims bad PThread behavior

    XMLWordPrintableJSON

    Details

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

      Description

      After using ThreadSanitizer to prove THRIFT-2755 is no longer present after THRIFT-3932 was completed, it looks like there are some issues in the PThreadThread class, specifically that the destructor calls a virtual method. ThreadSanitizer picks calls this out (many, many times).

      The usage may be correct, but since we're not using C++11 we cannot seal the class (mark it with the final keyword) which would tell ThreadSanitizer nothing can inherit from the class, making that behavior safe.

      Another way to deal with this is to move the join implementation to a non-virtual method and have both the dtor and join() call it.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jking3 James E. King III
                Reporter:
                jking3 James E. King III
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: