Open maxbachmann opened 2 years ago
On Python3.6 I do not get a segmentation fault:
[max@fedora Workspace]$ python3.6 test.py
4.0
However there is still an invalid read. It just does not lead to a segmentation fault:
[max@fedora Workspace]$ valgrind python3.6 test.py
==15034== Invalid read of size 8
==15034== at 0x12C154C2: __pyx_f_20weighted_levenshtein_4clev_c_damerau_levenshtein (clev.c:3437)
==15034== by 0x12C26D3C: __pyx_pf_20weighted_levenshtein_4clev_damerau_levenshtein (clev.c:2993)
==15034== by 0x12C26D3C: __pyx_pw_20weighted_levenshtein_4clev_1damerau_levenshtein (clev.c:2759)
==15034== by 0x495F10F: _PyCFunction_FastCallDict (methodobject.c:231)
==15034== by 0x495ECA7: call_function (ceval.c:4851)
==15034== by 0x495842B: _PyEval_EvalFrameDefault (ceval.c:3335)
==15034== by 0x4957264: _PyEval_EvalCodeWithName (ceval.c:4166)
==15034== by 0x4956EF9: PyEval_EvalCodeEx (ceval.c:4187)
==15034== by 0x49BB5CE: PyEval_EvalCode (ceval.c:731)
==15034== by 0x49D1CFD: run_mod (pythonrun.c:1025)
==15034== by 0x49D8158: PyRun_FileExFlags (pythonrun.c:978)
==15034== by 0x48FB48C: PyRun_SimpleFileExFlags.cold (pythonrun.c:419)
==15034== by 0x49B40D8: UnknownInlinedFun (main.c:344)
==15034== by 0x49B40D8: Py_Main (main.c:814)
==15034== Address 0x12bcbcc8 is 116,568 bytes inside an unallocated block of size 383,600 in arena "client"
==15034==
4.0
I just tried to run a simple example with weighted-levenshtein on Linux (Fedora 36) with Python3.9 and Python3.10, but I did run into a segmentation fault. I installed the library using:
and did run the following example:
This leads to the following valgrind output: