search for: guestfs_int_py_event_callback_wrapp

Displaying 14 results from an estimated 14 matches for "guestfs_int_py_event_callback_wrapp".

2019 Nov 18
0
[PATCH] Python: Fix GIL usage in guestfs_int_py_event_callback_wrapper (RHBZ#1773520)
...ttom. Signed-off-by: Sam Eiderman <sameid@google.com> --- python/handle.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/python/handle.c b/python/handle.c index ffd0794d8..659bb5b06 100644 --- a/python/handle.c +++ b/python/handle.c @@ -112,13 +112,17 @@ guestfs_int_py_event_callback_wrapper (guestfs_h *g, const char *buf, size_t buf_len, const uint64_t *array, size_t array_len) { - PyGILState_STATE py_save = PyGILState_UNLOCKED; + PyGILState_STATE py_save; PyObject *py_callback = callback; PyObject *py_...
2023 Feb 13
3
Issue with downloading files whose path contains multi-byte utf-8 characters
...g=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50 > #1 ?0x00007ffff7fac140 in <signal handler called> () at /lib/x86_64-linux-gnu/ > libpthread.so.0 > #2 ?0x00007ffff6f77701 in _Py_INCREF (op=<optimized out>) at /usr/include/ > python3.9/object.h:408 > #3 ?guestfs_int_py_event_callback_wrapper > ? ? (g=<optimized out>, flags=<optimized out>, array_len=0, array=0x0, buf_len= > 47, buf=0x113b8a0 "gs=0x0\r\ncommandrvf: udevadm --debug settle -E \303by", > event_handle=0, event=16, callback=0x7ffff2516600) at handle.c:137 > #4 ?guestfs_int_py_event_callbac...
2023 Feb 12
1
Issue with downloading files whose path contains multi-byte utf-8 characters
.../tmp/1') #0 raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007ffff7fac140 in <signal handler called> () at /lib/x86_64-linux-gnu/libpthread.so.0 #2 0x00007ffff6f77701 in _Py_INCREF (op=<optimized out>) at /usr/include/python3.9/object.h:408 #3 guestfs_int_py_event_callback_wrapper (g=<optimized out>, flags=<optimized out>, array_len=0, array=0x0, buf_len=47, buf=0x113b8a0 "gs=0x0\r\ncommandrvf: udevadm --debug settle -E \303by", event_handle=0, event=16, callback=0x7ffff2516600) at handle.c:137 #4 guestfs_int_py_event_callback_wrapper (g=<...
2023 Feb 14
2
[PATCH 1/2] python: Avoid crash if callback parameters cannot be built
.../listman.redhat.com/archives/libguestfs/2023-February/030653.html --- python/handle.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python/handle.c b/python/handle.c index c8752baf47..f37e939e03 100644 --- a/python/handle.c +++ b/python/handle.c @@ -134,18 +134,21 @@ guestfs_int_py_event_callback_wrapper (guestfs_h *g, args = Py_BuildValue ("(Kis#O)", (unsigned PY_LONG_LONG) event, event_handle, buf, buf_len, py_array); + if (args == NULL) { + PyErr_PrintEx (0); + goto out; + } + Py_INCREF (args); - py_r = PyObject_CallO...
2023 Feb 14
1
Issue with downloading files whose path contains multi-byte utf-8 characters
...> Stacktrace: > #0 ?0x00007f6dd17b4701 in _Py_INCREF (op=<optimized out>) at /usr/include/ > python3.9/object.h:408 > 408 ? ?op->ob_refcnt++; > (gdb) bt > #0 ?0x00007f6dd17b4701 in _Py_INCREF (op=<optimized out>) at /usr/include/ > python3.9/object.h:408 > #1 ?guestfs_int_py_event_callback_wrapper > ? ? (g=<optimized out>, flags=<optimized out>, array_len=0, array=0x0, buf_len= > 43, buf=0xd1dc90 "commandrvf: udevadm --debug settle -E /\347\232\204\303 > available\r\ned7 > #2 ?guestfs_int_py_event_callback_wrapper > ? ? (g=<optimized out>, callback=0x7...
2023 Feb 17
1
[PATCH] python: Avoid leaking py_array along error paths
...ff51c0201eb2e08f719de > Thanks: Laszlo Ersek > --- > python/handle.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/python/handle.c b/python/handle.c > index bf639b5789..717eee83ed 100644 > --- a/python/handle.c > +++ b/python/handle.c > @@ -136,6 +136,7 @@ guestfs_int_py_event_callback_wrapper (guestfs_h *g, > buf, buf_len, py_array); > if (args == NULL) { > PyErr_PrintEx (0); > + Py_DECREF (py_array); > goto out; > } See my response in the other thread. You are also leaking args, which is not fixed here. I think the corr...
2023 Feb 17
2
[PATCH v3 0/2] python: Avoid leaking py_array and py_args in event callbacks
Version 1 was here: https://listman.redhat.com/archives/libguestfs/2023-February/030732.html (Ignore version 2 which had a mistake, this is version 3) Following Eric's suggestion here: https://listman.redhat.com/archives/libguestfs/2023-February/030746.html let's decrement the reference of py_array right after adding it to the args. (This works even if args fails to be built).
2023 Feb 14
2
[PATCH 2/2] python: Use bytes instead of str for event callback buffer
...ee: https://listman.redhat.com/archives/libguestfs/2023-February/030653.html --- python/handle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/handle.c b/python/handle.c index f37e939e03..bf639b5789 100644 --- a/python/handle.c +++ b/python/handle.c @@ -131,7 +131,7 @@ guestfs_int_py_event_callback_wrapper (guestfs_h *g, } /* XXX As with Perl we don't pass the guestfs_h handle here. */ - args = Py_BuildValue ("(Kis#O)", + args = Py_BuildValue ("(Kiy#O)", (unsigned PY_LONG_LONG) event, event_handle, buf, buf_len, py_...
2023 Feb 16
1
[PATCH] python: Avoid leaking py_array along error paths
Tested by reverting bbf396fc5562b4f so that the error path is used, and re-running the reproducer supplied by Google. Rich.
2023 Feb 17
3
python: Avoid leaking py_array and py_args in event callbacks
Version 1 was here: https://listman.redhat.com/archives/libguestfs/2023-February/030732.html Following Eric's suggestion here: https://listman.redhat.com/archives/libguestfs/2023-February/030746.html let's decrement the reference of py_array right after adding it to the args. (This works even if args fails to be built). However the other part of Eric's suggestion is wrong as
2019 Jan 22
3
[PATCH v2 0/2] python: fixes for Python 3
A couple of fixes for Python 3 to the Python binding. Unfortunately a behaviour change is needed, although it fixes broken types used. Changes from v1: - handle also FBuffer in structs Pino Toscano (2): python: fix call of Python handlers of events python: change types for RBufferOut/FBuffer with Python 3 (RHBZ#1661871) generator/python.ml | 9 +++++++++ python/handle.c | 3 ++- 2
2019 Jan 22
3
[PATCH 0/2] python: fixes for Python 3
A couple of fixes for Python 3 to the Python binding. Unfortunately a behaviour change is needed, although it fixes broken types used. Pino Toscano (2): python: fix call of Python handlers of events python: change return type for RBufferOut with Python 3 (RHBZ#1661871) generator/python.ml | 4 ++++ python/handle.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) -- 2.20.1
2023 Feb 17
1
[PATCH 1/2] python: Avoid crash if callback parameters cannot be built
...python/handle.c | 9 ++++++--- > > 1 file changed, 6 insertions(+), 3 deletions(-) > > > > diff --git a/python/handle.c b/python/handle.c > > index c8752baf47..f37e939e03 100644 > > --- a/python/handle.c > > +++ b/python/handle.c > > @@ -134,18 +134,21 @@ guestfs_int_py_event_callback_wrapper (guestfs_h *g, > > args = Py_BuildValue ("(Kis#O)", > > (unsigned PY_LONG_LONG) event, event_handle, > > buf, buf_len, py_array); According to https://docs.python.org/3/c-api/arg.html#building-values, "O"...
2020 Mar 10
2
ANNOUNCE: libguestfs 1.42 - tools for accessing and modifying virtual machine disk images
...t filesystem). We expect to move from the Zanata service to the Weblate service for translated strings. For more information see https://bugzilla.redhat.com/1787301 Bugs fixed https://bugzilla.redhat.com/1773520 Segfault in python bindings for guestfs_int_py_event_callback_wrapper https://bugzilla.redhat.com/1746699 Can't import guest from export domain to data domain on rhv4.3 due to error "Invalid parameter: 'DiskType=1'" https://bugzilla.redhat.com/1733168 virt-v2v: Use scp -T in -i vmx -it ssh mode...