Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write_flif segfaults #1

Open
dniku opened this issue Jun 17, 2019 · 0 comments
Open

write_flif segfaults #1

dniku opened this issue Jun 17, 2019 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@dniku
Copy link
Owner

dniku commented Jun 17, 2019

import pyflif
import numpy as np

img = np.random.randint(0, 255, size=(320, 240, 3), dtype=np.uint8)
pyflif.write_flif('/tmp/test.flif', img)

causes CPython to segfault with the following backtrace (obtained with gdb --args python test.py):

#0  0x00007fffe3efa1e5 in FLIF_ENCODER::transformations(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&) () from /usr/lib/libflif.so.0
#1  0x00007fffe3effecc in FLIF_ENCODER::encode_file(char const*) () from /usr/lib/libflif.so.0
#2  0x00007fffe3efff8a in flif_encoder_encode_file () from /usr/lib/libflif.so.0
#3  0x00007ffff7f816d0 in ffi_call_unix64 () from /usr/lib/libffi.so.6
#4  0x00007ffff7f810a0 in ffi_call () from /usr/lib/libffi.so.6
#5  0x00007ffff7329625 in _ctypes_callproc () from /usr/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so
#6  0x00007ffff7329fb0 in ?? () from /usr/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so
#7  0x00007ffff7b9c62c in _PyObject_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0
#8  0x00007ffff7be10db in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0
#9  0x00007ffff7b6f6db in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0
#10 0x00007ffff7bdc032 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0
#11 0x00007ffff7b29dbb in _PyFunction_FastCallDict () from /usr/lib/libpython3.7m.so.1.0
#12 0x00007ffff7b39818 in _PyObject_Call_Prepend () from /usr/lib/libpython3.7m.so.1.0
#13 0x00007ffff7b286a2 in _PyObject_FastCallDict () from /usr/lib/libpython3.7m.so.1.0
#14 0x00007ffff7bddae7 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0
#15 0x00007ffff7b6f6db in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0
#16 0x00007ffff7be06ea in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0
#17 0x00007ffff7b28d09 in _PyEval_EvalCodeWithName () from /usr/lib/libpython3.7m.so.1.0
#18 0x00007ffff7b29c64 in PyEval_EvalCodeEx () from /usr/lib/libpython3.7m.so.1.0
#19 0x00007ffff7b29c8c in PyEval_EvalCode () from /usr/lib/libpython3.7m.so.1.0
#20 0x00007ffff7c52694 in ?? () from /usr/lib/libpython3.7m.so.1.0
#21 0x00007ffff7c53b6e in PyRun_FileExFlags () from /usr/lib/libpython3.7m.so.1.0
#22 0x00007ffff7c57035 in PyRun_SimpleFileExFlags () from /usr/lib/libpython3.7m.so.1.0
#23 0x00007ffff7c592a7 in ?? () from /usr/lib/libpython3.7m.so.1.0
#24 0x00007ffff7c594ec in _Py_UnixMain () from /usr/lib/libpython3.7m.so.1.0
#25 0x00007ffff7db6ce3 in __libc_start_main () from /usr/lib/libc.so.6
#26 0x000055555555505e in _start ()
@dniku dniku added the help wanted Extra attention is needed label Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant