[lldb] Prevent race condition when fetching /proc/cpuinfo
authorWalter Erquinigo <wallace@fb.com>
Wed, 3 Aug 2022 16:57:57 +0000 (09:57 -0700)
committerWalter Erquinigo <wallace@fb.com>
Mon, 8 Aug 2022 19:31:42 +0000 (12:31 -0700)
commitddd576ab87a16eb7fb06531da8040ac2ece0c9a3
tree4469c58df66bcc91dd285c39c4d7b5aab173bade
parent33af4b22f8ea5dc8340002833802be95ae9f83a1
[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
lldb/source/Plugins/Process/Linux/Procfs.cpp