This is an archive of the discontinued LLVM Phabricator instance.

Fix racy msan test
ClosedPublic

Authored by maxim-kuvyrkov on Feb 21 2018, 1:54 AM.

Details

Summary

Child thread may finish before pthread_setname_np() and/or
pthread_getname_np() had a chance to run, which causes these functions
to fail with ENOENT (meaning /proc/self/task/[tid]/comm doesn't exist).

Fix by stalling child thread on a mutex.

Diff Detail

Repository
rL LLVM

Event Timeline

maxim-kuvyrkov created this revision.Feb 21 2018, 1:54 AM
Herald added subscribers: Restricted Project, llvm-commits. · View Herald TranscriptFeb 21 2018, 1:54 AM
eugenis accepted this revision.Feb 21 2018, 8:25 AM
This revision is now accepted and ready to land.Feb 21 2018, 8:25 AM
This revision was automatically updated to reflect the committed changes.