This is an archive of the discontinued LLVM Phabricator instance.

Fix race in TestExitDuringStep and unify pseudo_barrier handling
ClosedPublic

Authored by labath on May 9 2016, 6:43 AM.

Details

Summary

TestExitDuringStep was very rarely hanging on the buildbots. I can't be sure, but I believe this
was because of the fact that it declared its pseudo_barrier variable as "volatile int", which is
not sufficient to guarantee corectness (also, all other tests used atomic variables for this, and
they were passing reliably AFAIK). Besides switching to an atomic variable in this test as well,
I have also took this opportunity to unify all the copies of the pseudo_barrier code to a single
place to reduce the chance of this happening again.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 56567.May 9 2016, 6:43 AM
labath retitled this revision from to Fix race in TestExitDuringStep and unify pseudo_barrier handling.
labath updated this object.
labath added a reviewer: clayborg.
labath added a subscriber: lldb-commits.
clayborg accepted this revision.May 9 2016, 10:42 AM
clayborg edited edge metadata.
This revision is now accepted and ready to land.May 9 2016, 10:42 AM
This revision was automatically updated to reflect the committed changes.