Page MenuHomePhabricator

__tsan::ThreadCreate takes incorrect value for detached argument
ClosedPublic

Authored by ismailp on Jun 22 2015, 10:20 AM.

Details

Summary

PTHREAD_CREATE_DETACHED has a different value on Mac OS X. Since both
PTHREAD_CREATE_JOINABLE and PTHREAD_CREATE_DETACHED are non-zero,
__tsan::ThreadCreate always creates detached threads.

Event Timeline

ismailp updated this revision to Diff 28125.Jun 22 2015, 10:20 AM
ismailp retitled this revision from to __tsan::ThreadCreate takes incorrect value for detached argument.
ismailp updated this object.
ismailp edited the test plan for this revision. (Show Details)
ismailp added reviewers: kcc, samsonov, glider.
ismailp added a subscriber: Unknown Object (MLST).

+dvyukov
LGTM

lib/tsan/rtl/tsan_interceptors.cc
42 ↗(On Diff #28257)

I don't think you need the definition of PTHREAD_CREATE_JOINABLE, since nobody's using it.

dvyukov edited edge metadata.Jun 23 2015, 9:55 AM

LGTM if you remove PTHREAD_CREATE_JOINABLE definition

ismailp updated this revision to Diff 28257.Jun 23 2015, 10:07 AM
ismailp edited edge metadata.

Removed PTHREAD_CREATE_JOINABLE definition.

samsonov accepted this revision.Jun 23 2015, 11:11 AM
samsonov edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jun 23 2015, 11:11 AM
This revision was automatically updated to reflect the committed changes.