[
https://issues.apache.org/jira/browse/THRIFT-3974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16124700#comment-16124700
]
ASF GitHub Bot commented on THRIFT-3974:
----------------------------------------
GitHub user jeking3 opened a pull request:
https://github.com/apache/thrift/pull/1331
THRIFT-3974: fix ThreadSanitizer identified issues
Tested with pthread, boost and std threads and -fsanitizer=thread with
clang-4.0.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jeking3/thrift THRIFT-3974
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/1331.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1331
----
commit 8a7d13e6a7acde8883be88ecca6506fb0ee695d7
Author: James E. King, III <[email protected]>
Date: 2017-08-12T20:04:55Z
THRIFT-3974: fix ThreadSanitizer identified issues
----
> Using clang-3.8 and ThreadSanitizer on the concurrency_test claims bad
> PThread behavior
> ---------------------------------------------------------------------------------------
>
> Key: THRIFT-3974
> URL: https://issues.apache.org/jira/browse/THRIFT-3974
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.9.3, 0.10.0
> Reporter: James E. King, III
> Assignee: James E. King, III
> Priority: Minor
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)