Crash occurs while calling bs_size_convert() with "unit" containing
invalid data:
Core was generated by `/usr/bin/python3
./tests/libbytesize_unittest.py'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0fae2cd0 in bs_size_convert_to (size=0x11a1aec0, unit=<error
reading variable: Cannot access memory at address 0x1>,
error=0xf77e1b50) at bs_size.c:663
663 char* bs_size_convert_to (const BSSize size, BSUnit unit,
BSError **error) {
(gdb) bt
#0 0x0fae2cd0 in bs_size_convert_to (size=0x11a1aec0, unit=<error
reading variable: Cannot access memory at address 0x1>,
error=0xf77e1b50) at bs_size.c:663
#1 0x0fb96f7c in ffi_call_SYSV () at ../src/powerpc/sysv.S:104
#2 0x0fb95e7c in ffi_call_int (cif=cif@entry=0xffa43c90,
fn=fn@entry=0xfae2ca0 <bs_size_convert_to>,
rvalue=rvalue@entry=0xffa43bf0, avalue=avalue@entry=0xffa43bd0,
closure=closure@entry=0x0)
at ../src/powerpc/ffi.c:110
#3 0x0fb95fa0 in ffi_call (cif=cif@entry=0xffa43c90,
fn=fn@entry=0xfae2ca0 <bs_size_convert_to>,
rvalue=rvalue@entry=0xffa43bf0, avalue=avalue@entry=0xffa43bd0) at
../src/powerpc/ffi.c:140
#4 0x0fbd3918 in _call_function_pointer (st=0xf79b6be8,
flags=<optimized out>, pProc=0xfae2ca0 <bs_size_convert_to>,
avalues=0xffa43bd0, atypes=<optimized out>, restype=0x11bc83f8,
resmem=<optimized
out>, argcount=3,
argtypecount=<optimized out>) at ../Modules/_ctypes/callproc.c:950
#5 _ctypes_callproc (st=st@entry=0xf79b6be8, pProc=0xfae2ca0
<bs_size_convert_to>, argtuple=argtuple@entry=(<SizeStruct() at remote
0xf77e1c60>, 1, <_ctypes.CArgObject at remote 0xf77d2760>),
flags=<optimized out>,
argtypes=<optimized out>,
restype=<_ctypes.PyCSimpleType(__module__='ctypes',
__firstlineno__=241, _type_='z', __repr__=<function at remote
0xf788bc58>, __static_attributes__=(), __dict__=<getset_descriptor at
remote
0xf7894c28>, __weakref__=<getset_descriptor at remote 0xf7894c48>,
__doc__=None, from_param=<classmethod_descriptor at remote
0xf7896c80>) at remote 0x11bc8218>, checker=0x0) at
../Modules/_ctypes/callproc.c:1301
Could be a bug in libffi.