Thanks Richard!
The patches are similar to what we did locally, and applying them fixed the
issue with the actual use-case (not just the sanitized repro).
On Tue, Feb 14, 2023 at 8:10 PM Richard W.M. Jones
wrote:
> On Tue, Feb 14, 2023 at 08:02:59PM +0200, Yonatan Shtarkman wrote:
> > The
The event callback gets a buffer parameter which is usually something
like a log message. However as it comes from C it is not necessarily
well-formed (eg) UTF-8 but could contain any old byte sequence.
In the test case provided by the reported, we failed to encode the
buffer as str with this
In the case that building the parameters to the Python event callback
fails, args was returned as NULL. We immediately tried to call
Py_INCREF on this which crashed. Returning NULL means the Python
function threw an exception, so print the exception and return (there
is no way to return an error
On Tue, Feb 14, 2023 at 08:02:59PM +0200, Yonatan Shtarkman wrote:
> The attached code snippetĀ reproduces the issue when running:
> python3 libugestfs_segfault_repro.py
>
> With:
> guestfs version: 1.48.6
> guestfs-python version: 1.48.6
Can confirm with
The attached code snippet reproduces the issue when running:
python3 libugestfs_segfault_repro.py
With:
guestfs version: 1.48.6
guestfs-python version: 1.48.6
Stacktrace:
#0 0x7f6dd17b4701 in _Py_INCREF (op=) at
/usr/include/python3.9/object.h:408
408op->ob_refcnt++;
(gdb) bt
#0