[Lldb-commits] [PATCH] D51569: Hold GIL while allocating memory for PythonString.

2018-09-05 Thread Phabricator via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB341482: Hold GIL while allocating memory for PythonString. (authored by tkrasnukha, committed by ). Repository: rLLDB LLDB https://reviews.llvm.org/D51569 Files: scripts/Python/python-extensions.

[Lldb-commits] [PATCH] D51569: Hold GIL while allocating memory for PythonString.

2018-09-05 Thread Tatyana Krasnukha via Phabricator via lldb-commits
tatyana-krasnukha updated this revision to Diff 164008. tatyana-krasnukha added a comment. Use more readable aliases to set end clear the feature. Repository: rLLDB LLDB https://reviews.llvm.org/D51569 Files: scripts/Python/python-extensions.swig Index: scripts/Python/python-extensions.sw

[Lldb-commits] [PATCH] D51569: Hold GIL while allocating memory for PythonString.

2018-09-04 Thread Tatyana Krasnukha via Phabricator via lldb-commits
tatyana-krasnukha added a comment. I have a third party module which implements a custom command for LLDB. The command calls `str(target)`, `str(process)`, etc. for logging. Anyway, every call to these functions will cause this crash to happen, because PythonString is allocated after releasing

[Lldb-commits] [PATCH] D51569: Hold GIL while allocating memory for PythonString.

2018-09-04 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. What kind of scenario causes this crash to happen? Seems like a hack? Repository: rLLDB LLDB https://reviews.llvm.org/D51569 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[Lldb-commits] [PATCH] D51569: Hold GIL while allocating memory for PythonString.

2018-09-04 Thread Tatyana Krasnukha via Phabricator via lldb-commits
tatyana-krasnukha added a comment. Yes, and `%feature("nothreadallow")` doesn't allow to release GIL before calling these functions - it prevents Swig from wrapping them into SWIG_PYTHON_THREAD_BEGIN_ALLOW .. SWIG_PYTHON_THREAD_END_ALLOW block. Repository: rLLDB LLDB https://reviews.llvm.o

[Lldb-commits] [PATCH] D51569: Hold GIL while allocating memory for PythonString.

2018-09-04 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Not sure about this one. IIUC we now wouldn't take the GIL for these functions now and hope that the str() function doesn't do something that would require thread safety? Repository: rLLDB LLDB https://reviews.llvm.org/D51569

[Lldb-commits] [PATCH] D51569: Hold GIL while allocating memory for PythonString.

2018-09-02 Thread Enrico Granata via Phabricator via lldb-commits
granata.enrico resigned from this revision. granata.enrico added a comment. I don't work on LLDB anymore. I am sure Greg will do a fine job reviewing! Repository: rLLDB LLDB https://reviews.llvm.org/D51569 ___ lldb-commits mailing list lldb-commi

[Lldb-commits] [PATCH] D51569: Hold GIL while allocating memory for PythonString.

2018-09-02 Thread Tatyana Krasnukha via Phabricator via lldb-commits
tatyana-krasnukha updated this revision to Diff 163646. tatyana-krasnukha added a comment. %feature("nothreadallow") looks more appropriate in this case. GetDescription method is quite cheap, no need to handle the GIL. Repository: rLLDB LLDB https://reviews.llvm.org/D51569 Files: scripts/

[Lldb-commits] [PATCH] D51569: Hold GIL while allocating memory for PythonString.

2018-09-01 Thread Tatyana Krasnukha via Phabricator via lldb-commits
tatyana-krasnukha created this revision. tatyana-krasnukha added reviewers: clayborg, granata.enrico. Herald added a subscriber: lldb-commits. Swig wraps C++ code into `SWIG_PYTHON_THREAD_BEGIN_ALLOW; ... SWIG_PYTHON_THREAD_END_ALLOW;` Thus, lldb crashs with "Fatal Python error: Python memory a