Displaying 5 results from an estimated 5 matches for "py_finalize".
Did you mean:
pol_finalize
2018 Apr 06
0
[nbdkit PATCH 1/2] python: Use Py_XDEFREF()
...tions(-)
diff --git a/plugins/python/python.c b/plugins/python/python.c
index 35e8df2..c5cc4bd 100644
--- a/plugins/python/python.c
+++ b/plugins/python/python.c
@@ -183,8 +183,7 @@ py_load (void)
static void
py_unload (void)
{
- if (module)
- Py_DECREF (module);
+ Py_XDECREF (module);
Py_Finalize ();
}
@@ -346,8 +345,7 @@ py_close (void *handle)
Py_DECREF (fn);
Py_DECREF (args);
check_python_failure ("close");
- if (r)
- Py_DECREF (r);
+ Py_XDECREF (r);
}
Py_DECREF (obj);
@@ -550,8 +548,7 @@ py_zero (void *handle, uint32_t count, uint64_t offset,...
2018 Dec 02
0
[PATCH nbdkit 3/4] valgrind: Enable valgrinding of Python plugin.
...there is no way to stop the Python object
+# (representing the compiled code?) from leaking from this API.
+{
+ python_4
+ Memcheck:Leak
+ fun:malloc
+ ...
+ fun:PyRun_SimpleFileExFlags
+}
+
+# This seems like a bug in Python itself.
+{
+ python_5
+ Memcheck:Leak
+ fun:malloc
+ ...
+ fun:Py_Finalize
+}
diff --git a/wrapper.c b/wrapper.c
index 3fd499b..f19c09a 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -135,7 +135,7 @@ main (int argc, char *argv[])
passthru_format ("--suppressions=%s/valgrind/suppressions", builddir);
passthru ("--trace-children=no");
passthru...
2020 Aug 05
5
[PATCH nbdkit 3/4] python: Allow thread model to be set from Python plugins.
This is working for me now, although possibly only on Python 3.9.
Dan suggested PyEval_InitThreads but that was deprecated in
Python 3.7.
Rich.
2018 Apr 06
6
[nbdkit PATCH 0/2] Python cleanups
I noticed these while working on adding fua support into python,
these are independent enough to push now (and I'll have to rebase
my 'optional may_trim' patch on top of this).
Eric Blake (2):
python: Use Py_XDEFREF()
python: Simplify calling into plugin
plugins/python/python.c | 106 ++++++++----------------------------------------
1 file changed, 18 insertions(+), 88
2018 Dec 02
10
[PATCH nbdkit 0/4] Multiple valgrind improvements and possible security fix.
I worked out why valgrind wasn't being applied to nbdkit when run by
many of the tests (patches 1-2). Unfortunately I'm not able to make
it actually fail tests when valgrind fails. Although the situation is
marginally improved in that you can now manually examine the *.log
files and find valgrind failures that way. Also adds valgrinding of
the Python plugin (patch 3).
Along the way I