diff options
author | Pavel Labath <labath@google.com> | 2018-06-25 14:28:38 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-06-25 14:28:38 +0000 |
commit | f104d6b224600d76de3c8792ae075d3f9b3e118a (patch) | |
tree | 0b70f7b0280bb45b799227dcb9e9ecedc4eb64da /lldb/packages/Python/lldbsuite | |
parent | 6facf4715c4a58ec9c9fc832fe9fbed3211fa41d (diff) | |
download | bcm5719-llvm-f104d6b224600d76de3c8792ae075d3f9b3e118a.tar.gz bcm5719-llvm-f104d6b224600d76de3c8792ae075d3f9b3e118a.zip |
Fix TestThreadExit for gcc&libc++ combo
pseudo_barrier_wait() begins by decrementing an atomic variable. Since
these are always_inline in libc++, there is no line table anchor to
break on before we decrement it. This meant that on gcc we stopped after
the variable has been decremented, which meant that thread2 could have
exited, violating the test setup. On clang this wasn't a problem
because it generated some line table entries for the do{}while(0) loop
in the macro, so we still ended up stopping, before we touched the
variable.
I fix this by adding a dummy statement before the pseudo_barrier_wait()
command and setting the breakpoint there.
llvm-svn: 335476
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/main.cpp index f9508cf6ecc..432adc0ea00 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/main.cpp +++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/main.cpp @@ -64,7 +64,8 @@ int main () thread_1.join(); // Synchronize with the remaining thread - pseudo_barrier_wait(g_barrier3); // Set third breakpoint here + int dummy = 47; // Set third breakpoint here + pseudo_barrier_wait(g_barrier3); // Wait for the second thread to finish thread_2.join(); |