[all-commits] [llvm/llvm-project] ddd576: [lldb] Prevent race condition when fetching /proc/...

walter erquinigo via All-commits all-commits at lists.llvm.org
Mon Aug 8 12:31:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ddd576ab87a16eb7fb06531da8040ac2ece0c9a3
      https://github.com/llvm/llvm-project/commit/ddd576ab87a16eb7fb06531da8040ac2ece0c9a3
  Author: Walter Erquinigo <wallace at fb.com>
  Date:   2022-08-08 (Mon, 08 Aug 2022)

  Changed paths:
    M lldb/source/Plugins/Process/Linux/Procfs.cpp

  Log Message:
  -----------
  [lldb] Prevent race condition when fetching /proc/cpuinfo

@clayborg found a potential race condition when setting a static
variable. The fix seems simply to use call_once.

All relevant tests pass.

Differential Revision: https://reviews.llvm.org/D131081




More information about the All-commits mailing list