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.
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
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
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
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
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
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
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/
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