summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--misc/misc.supp35
-rw-r--r--misc/openssl.supp17
-rw-r--r--misc/valgrind-supp-extractor.c10
3 files changed, 41 insertions, 21 deletions
diff --git a/misc/misc.supp b/misc/misc.supp
new file mode 100644
index 0000000..440d754
--- /dev/null
+++ b/misc/misc.supp
@@ -0,0 +1,35 @@
+### this is just gnome being gnome, don't look at me. (generated with make gensupp on debian 11, debian 10 has different suppressions, see https://git.sijanec.eu/sijanec/discord.c/src/commit/b0f99ab804bd68e89326fe561abc5b702dd3599b/misc/misc.supp)
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ match-leak-kinds: definite
+ fun:malloc
+ obj:/usr/lib/i386-linux-gnu/libfontconfig.so.1.12.0
+ obj:/usr/lib/i386-linux-gnu/libfontconfig.so.1.12.0
+ obj:/usr/lib/i386-linux-gnu/libfontconfig.so.1.12.0
+ obj:/usr/lib/i386-linux-gnu/libfontconfig.so.1.12.0
+ obj:/usr/lib/i386-linux-gnu/libexpat.so.1.6.12
+ obj:/usr/lib/i386-linux-gnu/libexpat.so.1.6.12
+ obj:/usr/lib/i386-linux-gnu/libexpat.so.1.6.12
+ fun:XML_ParseBuffer
+ obj:/usr/lib/i386-linux-gnu/libfontconfig.so.1.12.0
+ obj:/usr/lib/i386-linux-gnu/libfontconfig.so.1.12.0
+ obj:/usr/lib/i386-linux-gnu/libfontconfig.so.1.12.0
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ match-leak-kinds: definite
+ fun:realloc
+ obj:/usr/lib/i386-linux-gnu/libfontconfig.so.1.12.0
+ obj:/usr/lib/i386-linux-gnu/libfontconfig.so.1.12.0
+ fun:FcPatternAddInteger
+ obj:/usr/lib/i386-linux-gnu/libcairo.so.2.11600.0
+ obj:/usr/lib/i386-linux-gnu/libpangocairo-1.0.so.0.4600.2
+ obj:/usr/lib/i386-linux-gnu/libpangoft2-1.0.so.0.4600.2
+ obj:/usr/lib/i386-linux-gnu/libpango-1.0.so.0.4600.2
+ fun:pango_itemize_with_base_dir
+ obj:/usr/lib/i386-linux-gnu/libpango-1.0.so.0.4600.2
+ fun:pango_layout_get_unknown_glyphs_count
+ obj:/usr/lib/i386-linux-gnu/libgtk-3.so.0.2404.20
+}
diff --git a/misc/openssl.supp b/misc/openssl.supp
deleted file mode 100644
index 21d47cd..0000000
--- a/misc/openssl.supp
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- Ignore OpenSSL malloc
- Memcheck:Leak
- fun:malloc
- fun:CRYPTO_malloc
- ...
- obj:*libcrypto*
-}
-
-{
- Ignore OpenSSL realloc
- Memcheck:Leak
- fun:realloc
- fun:CRYPTO_realloc
- ...
- obj:*libcrypto*
-}
diff --git a/misc/valgrind-supp-extractor.c b/misc/valgrind-supp-extractor.c
index 0b56a91..ce40a59 100644
--- a/misc/valgrind-supp-extractor.c
+++ b/misc/valgrind-supp-extractor.c
@@ -3,12 +3,14 @@ int main (int argc, char ** argv) {
char c = fgetc(stdin);
int s = 0; /* 0: not in supp, 1: in supp */
while (!feof(stdin)) {
- if (c == '}')
- s = 0;
- if (s)
- fputc(c, stdout);
if (c == '{')
s = 1;
+ if (s)
+ fputc(c, stdout);
+ if (c == '}') {
+ fputc('\n', stdout);
+ s = 0;
+ }
c = fgetc(stdin);
}
fflush(stdout);