[all-commits] [llvm/llvm-project] 586123: [lldb] Track the API boundary using a thread_local...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Wed Dec 9 09:03:06 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5861234e72c035ad39b5fd843eef78ab4039351e
      https://github.com/llvm/llvm-project/commit/5861234e72c035ad39b5fd843eef78ab4039351e
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-12-09 (Wed, 09 Dec 2020)

  Changed paths:
    M lldb/include/lldb/Utility/ReproducerInstrumentation.h
    M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
    M lldb/source/Utility/ReproducerInstrumentation.cpp

  Log Message:
  -----------
  [lldb] Track the API boundary using a thread_local variable.

The reproducers currently use a static variable to track the API
boundary. This is obviously incorrect when the SB API is used
concurrently. While I do not plan to support that use-case (right now),
I do want to avoid us crashing. As a first step, correctly track API
boundaries across multiple threads.

Before this patch SB API calls made by the embedded script interpreter
would be considered "behind the API boundary" and correctly ignored.
After this patch, we need to tell the reproducers to ignore the
scripting thread as a "private thread".

Differential revision: https://reviews.llvm.org/D92811




More information about the All-commits mailing list