On Sat, Jan 28, 2023 at 08:48:52PM +0000, Stuart Henderson wrote: > Python bindings for LMDB. OK to import? >
Something's wrong. When trying to run tests, I got E ModuleNotFoundError: No module named 'cffi' So I added py3-cffi and then got this: tests/env_test.py .........................F...Fatal Python error: Segmentation fault Looks like a NULL deref: 46718 python3.10 CALL thrkill(0,SIGSEGV,0) 46718 python3.10 PSIG SIGSEGV SIG_DFL addr=0x0 trapno=0 46718 python3.10 NAMI "python3.10.core" I couldn't immediately spot what's wrong in the python code. Happens on both amd64 and arm64. Current thread 0x00000575aea4aa28 (most recent call first): File "/usr/ports/pobj/py-lmdb-1.4.0-python3/lmdb-1.4.0/lmdb/cffi.py", line 552 in _mvstr File "/usr/ports/pobj/py-lmdb-1.4.0-python3/lmdb-1.4.0/lmdb/cffi.py", line 1783 in item File "/usr/ports/pobj/py-lmdb-1.4.0-python3/lmdb-1.4.0/lmdb/cffi.py", line 1799 in _iter File "/usr/ports/pobj/py-lmdb-1.4.0-python3/lmdb-1.4.0/tests/env_test.py", line 286 in <lambda> File "/usr/local/lib/python3.10/unittest/case.py", line 201 in handle File "/usr/local/lib/python3.10/unittest/case.py", line 738 in assertRaises File "/usr/ports/pobj/py-lmdb-1.4.0-python3/lmdb-1.4.0/tests/env_test.py", line 286 in test_close File "/usr/local/lib/python3.10/unittest/case.py", line 549 in _callTestMethod ... #0 thrkill () at /tmp/-:3 #1 0xd193c8d5061dc530 in ?? () #2 <signal handler called> #3 0x0000057609261a46 in PyBytes_FromStringAndSize () from /usr/local/lib/libpython3.10.so.0.0 #4 0x000005762af91d53 in mb_slice (self=0x5760d076480, left=<optimized out>, right=<optimized out>) at c/minibuffer.h:37 #5 mb_subscript (self=0x5760d076480, item=<slice at remote 0x5760d09ecc0>) at c/minibuffer.h:267 #6 0x00000576093c15f4 in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.10.so.0.0 #7 0x00000576093b7251 in _PyEval_Vector () from /usr/local/lib/libpython3.10.so.0.0 #8 0x00000576093c80e8 in call_function () from /usr/local/lib/libpython3.10.so.0.0 #9 0x00000576093bcb5d in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.10.so.0.0 #10 0x00000576093b7251 in _PyEval_Vector () from /usr/local/lib/libpython3.10.so.0.0 #11 0x0000057609277b95 in method_vectorcall () from /usr/local/lib/libpython3.10.so.0.0 #12 0x00000576093c80e8 in call_function () from /usr/local/lib/libpython3.10.so.0.0