Commit Graph

8 Commits

Author SHA1 Message Date
Peter Wu ecb04e4076 vg-suppressions: suppress more GLib-related memleaks
g_get_charset, g_get_filename_charsets, g_strerror, g_get_home_dir all
return a const char pointer. get_global_random is internally called by
g_random_int, g_random_int_range, etc.

On Arch Linux with glibc 2.26-11 and glib2 2.56.0+7+g66948ae23-1,
"call_init" is not visible in the stack trace, so replace it by "...".
It also has "possibly lost" entries due to GLib types initialization
(gobject_init -> _g_enum_types_init). Finally "g_private_set" internally
leaks after calling "g_private_get_impl".

Change-Id: Ifb2be3188add7bdd060d1e7321c8126e5924a738
Reviewed-on: https://code.wireshark.org/review/27118
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-24 21:12:49 +00:00
Darius Davis 5c2eade45d Tweak ws_cpuid so that Valgrind is happy.
Valgrind considers the "cpuid" instruction to always depend on inputs from eax
and ecx, even though it's only a subset of values of eax for which ecx is
relevant.  If ecx is undefined when cpuid is executed, the outputs of cpuid
will be considered undefined.

Instead of suppressing the resulting uninitialised-value warning (the
suppression for which is now out-of-date anyway, now that
register_all_protocols is moved to a worker thread), let's simply set ecx to
zero in ws_cpuid.

Testing done: Built Wireshark on Linux amd64.  Before this change, running
   "tools/valgrind-wireshark.sh ./test/captures/dhcp.pcap" with
   valgrind-3.12.0.SVN on Debian 9.4 amd64 would yield the following Valgrind
   error:

   ==2416== Thread 2:
   ==2416== Conditional jump or move depends on uninitialised value(s)
   ==2416==    at 0xACB8B22: ws_mempbrk_sse42_compile (ws_mempbrk_sse42.c:58)
   ==2416==    by 0x74F4960: register_all_protocols_worker (register.c:37)
   ==2416==    by 0xB1403D4: g_thread_proxy (gthread.c:784)
   ==2416==    by 0xD438493: start_thread (pthread_create.c:333)
   ==2416==    by 0xB4CAACE: clone (clone.S:97)

   With the change, the above message is gone.  Inspected the disassembly of
   function ws_cpuid, and it looks sane -- just an added "xor ecx, ecx" at the
   top.

Change-Id: I2fb382309cac234c400286a6e9fac7d922912c63
Reviewed-on: https://code.wireshark.org/review/26733
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-05 07:34:01 +00:00
Dario Lombardo e325391574 tools: add more entries to valgrind suppression file (libc).
Remove leak from dl_init.

Change-Id: Iaefc20bd0c71157d604f8f0b2538dc2481fc56db
Reviewed-on: https://code.wireshark.org/review/20248
Reviewed-by: Evan Huus <eapache@gmail.com>
2017-03-05 15:12:20 +00:00
Dario Lombardo a819806e1f tools: add more entries to valgrind suppression file (glib).
Remove leaks coming from glib.

Change-Id: I05fc6b1143e2d20c953a2c602989cec0cc786f27
Reviewed-on: https://code.wireshark.org/review/20247
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-05 15:07:02 +00:00
Dario Lombardo 119bf86366 tools: add suppressions to valgrind.
Remove leaks from libgcrypt.

Change-Id: I920e504cfcb45c41510f3edc65d2dbeefda5c5a1
Reviewed-on: https://code.wireshark.org/review/20093
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-02-13 16:43:44 +00:00
Pascal Quantin 0ed1b0f194 Add ws_mempbrk_sse42_compile to Valgrind suppression list
When running Valgrind 3.10.0 on an Ubuntu 10.10 x64 guest with Virtualbox 4.3.22, ws_cpuid_sse42() call triggers a false positive when checking ECX bit 20
Guy kindly verified the assembler code and confirmed that everything seems fine
Let's remove the error to avoid noise when running Valgrind on a capture
Change-Id: I357633950249a0c781482865c3221a1babdc74e2
Reviewed-on: https://code.wireshark.org/review/7124
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-02-15 18:46:54 +00:00
Evan Huus ebe713223e Remove valgrind suppression for old zlib version
The fuzzbot has been upgraded, so hopefully this is no longer necessary.

Change-Id: Ia2d8ae03180c6e0b81a4f7b69b72610d047307ff
Reviewed-on: https://code.wireshark.org/review/3194
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-25 02:58:49 +00:00
Evan Huus 1a884bf191 Add a valgrind suppressions file set to suppress the zlib error which otherwise
pops up immediately on the fuzzbot. Hopefully there won't be too many more of
these.

svn path=/trunk/; revision=51434
2013-08-20 03:21:06 +00:00