valgrind memory leak check

This commit is contained in:
Eric Soroos 2025-05-13 10:27:38 +02:00
parent 74ab5ac4cd
commit 4984c45da2
2 changed files with 26 additions and 0 deletions

View File

@ -99,6 +99,12 @@ valgrind:
--log-file=/tmp/valgrind-output \
python3 -m pytest --no-memcheck -vv --valgrind --valgrind-log=/tmp/valgrind-output
.PHONY: valgrind-leak
valgrind-leak:
PYTHONMALLOC=malloc valgrind --suppressions=Tests/oss-fuzz/python.supp --leak-check=full --show-leak-kinds=definite --errors-for-leak-kinds=definite \
--log-file=/tmp/valgrind-output \
python3 -m pytest -vv --valgrind --valgrind-log=/tmp/valgrind-output Tests/
.PHONY: readme
readme:
python3 -c "import markdown2" > /dev/null 2>&1 || python3 -m pip install markdown2

View File

@ -14,3 +14,23 @@
fun:_TIFFReadEncodedTileAndAllocBuffer
...
}
{
<python_alloc_possible_leak>
Memcheck:Leak
match-leak-kinds: possible
fun:malloc
fun:_PyMem_RawMalloc
fun:PyObject_Malloc
...
}
{
<python_realloc_possible_leak>
Memcheck:Leak
match-leak-kinds: possible
fun:malloc
fun:_PyMem_RawRealloc
fun:PyMem_Realloc
...
}