Add script to run htop under valgrind

Includes suppressions for ncurses leaks.
This commit is contained in:
Christian Göttsche 2020-09-11 20:15:33 +02:00
parent c7568bc054
commit 3142077c76
2 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,63 @@
{
<ncurses internal memory allocated at startup>
Memcheck:Leak
match-leak-kinds: reachable
...
fun:CRT_init
fun:main
}
{
<ncurses internal memory allocated at startup>
Memcheck:Leak
match-leak-kinds: reachable
...
fun:CRT_init
}
{
<ncurses internal memory>
Memcheck:Leak
match-leak-kinds: reachable
...
fun:wgetch
fun:ScreenManager_run
fun:Action_runSetup
fun:actionSetup
fun:MainPanel_eventHandler
fun:ScreenManager_run
fun:main
}
{
<ncurses internal memory>
Memcheck:Leak
match-leak-kinds: reachable
...
fun:wgetch
fun:ScreenManager_run
fun:main
}
{
<ncurses internal memory>
Memcheck:Leak
match-leak-kinds: reachable
...
fun:wrefresh
fun:main
}
{
<ncurses internal memory>
Memcheck:Leak
match-leak-kinds: reachable
fun:realloc
fun:_nc_doalloc
fun:_nc_tparm_analyze
fun:tparm
...
fun:doupdate_sp
fun:wrefresh
obj:*
}

6
scripts/run_valgrind.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
SCRIPT=$(readlink -f "$0")
SCRIPTDIR=$(dirname "$SCRIPT")
valgrind --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --suppressions="${SCRIPTDIR}/htop_suppressions.valgrind" "${SCRIPTDIR}/../htop"