This revision was not accepted when it landed; it landed in state "Needs
Revision".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf8b22f8fea18: Fix ref counting of Python objects. (authored
by zturner).
Herald added a project: LLDB.
Changed prior to
granata.enrico resigned from this revision.
granata.enrico removed a reviewer: granata.enrico.
granata.enrico added a comment.
I am not an Apple employee working on LLDB anymore
https://reviews.llvm.org/D13617
___
lldb-commits mailing list
lldb-comm
clayborg added a comment.
I would like to see PythonObject used in place of PyRef, feel free to remove
the operator bool and PyObject, and then the rest of the mostly indent and
style cleanups.
Comment at: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h:73-79
@@ -7
zturner added a comment.
Let me know what you think about my responses. Anything I didn't specifically
call out I'll fix in the next version of the patch.
Comment at: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h:73-79
@@ -73,2 +72,9 @@
-class PythonObject
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.
See inlined comments.
Comment at: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h:73-79
@@ -73,2 +72,9 @@
-class PythonObject
+enum class PyRef
zturner added inline comments.
Comment at: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp:337
@@ -336,3 +346,3 @@
{
-PythonObject::Reset(PyLong_FromLongLong(value));
}
Just to provide one example, here is an instance of a fixed memory leak.
zturner created this revision.
zturner added a reviewer: clayborg.
zturner added a subscriber: lldb-commits.
PythonObjects were being incorrectly ref-counted. This problem was pervasive
throughout the codebase, leading to an unknown number of memory leaks and
potentially use-after-free.
The