2 Commits

Author SHA1 Message Date
b3fde55107 .gitignore: valgrind.out 2023-07-14 08:45:46 +02:00
f2d4f07069 valgrind: ignore libreadline errors 2023-07-14 08:35:47 +02:00
3 changed files with 14 additions and 2 deletions

1
.gitignore vendored
View File

@@ -20,3 +20,4 @@ brchess
/lib/
/.deps/
/notused/
valgrind.out

View File

@@ -201,12 +201,17 @@ bear: clean $(CCLSROOT)
@touch .ccls-root
@$(BEAR) -- make compile
##################################### LSP (ccls)
##################################### valgrind (mem check)
.PHONY: memcheck
VALGRIND = valgrind
VALGRINDFLAGS = --leak-check=full --show-leak-kinds=all
VALGRINDFLAGS += --track-origins=yes --sigill-diagnostics=yes
VALGRINDFLAGS += --quiet --show-error-list=yes
VALGRINDFLAGS += --log-file=valgrind.out
# We need to suppress libreadline leaks here. See :
# https://stackoverflow.com/questions/72840015
VALGRINDFLAGS += --suppressions=etc/libreadline.supp
memcheck: brchess
memcheck: bin
@$(VALGRIND) $(VALGRINDFLAGS) ./brchess

6
etc/libreadline.supp Normal file
View File

@@ -0,0 +1,6 @@
{
ignore_libreadline_leaks
Memcheck:Leak
...
obj:*/libreadline.so.*
}