[Lldb-commits] [PATCH] D117601: [lldb] Make Python initialization atomic

2022-01-19 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeb5c0ea68180: [lldb] Initialize Python exactly once (authored by JDevlieghere). Herald added a project: LLDB. Changed prior to commit: https://reviews.llvm.org/D117601?vs=401267&id=401300#toc Repositor

[Lldb-commits] [PATCH] D117601: [lldb] Make Python initialization atomic

2022-01-19 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. LG, thanks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117601/new/ https://reviews.llvm.org/D117601 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-

[Lldb-commits] [PATCH] D117601: [lldb] Make Python initialization atomic

2022-01-19 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:3154-3176 -#if LLDB_USE_PYTHON_SET_INTERRUPT -namespace { -/// Saves the current signal handler for the specified signal and restores -/// it at the end of th

[Lldb-commits] [PATCH] D117601: [lldb] Make Python initialization atomic

2022-01-19 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 401267. JDevlieghere edited the summary of this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. Do private initialization exactly once in ScriptInterpreterPython::Initialize CHANGES SINCE LAST ACTION https://re

[Lldb-commits] [PATCH] D117601: [lldb] Make Python initialization atomic

2022-01-18 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere planned changes to this revision. JDevlieghere added a comment. In D117601#3253663 , @labath wrote: > I don't think that `atomic` is what you want here. In the case of a > race, the "loser" will immediately continue to use python as if it wa

[Lldb-commits] [PATCH] D117601: [lldb] Make Python initialization atomic

2022-01-18 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I don't think that `atomic` is what you want here. In the case of a race, the "loser" will immediately continue to use python as if it was initialized, even though the winner has not finished the initialization. You most likely need `call_once` semantics, blocking all th

[Lldb-commits] [PATCH] D117601: [lldb] Make Python initialization atomic

2022-01-18 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117601/new/ https://reviews.llvm.org/D117601 ___ lldb-commits mailing list lldb-commits@lists

[Lldb-commits] [PATCH] D117601: [lldb] Make Python initialization atomic

2022-01-18 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere created this revision. JDevlieghere added reviewers: labath, mib. JDevlieghere requested review of this revision. We got a few crash reports that showed LLDB initializing Python on two separate threads. Make `g_initialized` atomic to prevent that from happening. https://reviews.llv