[Lldb-commits] [PATCH] D20065: Fix race in TestExitDuringStep and unify pseudo_barrier handling

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon May 9 06:43:01 PDT 2016


labath created this revision.
labath added a reviewer: clayborg.
labath added a subscriber: lldb-commits.

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.

http://reviews.llvm.org/D20065

Files:
  packages/Python/lldbsuite/test/functionalities/thread/break_after_join/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/create_during_step/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/multi_break/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/step_out/main.cpp
  packages/Python/lldbsuite/test/functionalities/thread/thread_exit/main.cpp
  packages/Python/lldbsuite/test/make/test_common.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20065.56567.patch
Type: text/x-patch
Size: 9379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160509/951859ef/attachment.bin>


More information about the lldb-commits mailing list