This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] gdb/testsuite: Add framework for running under valgrind
- From: Simon Marchi <simark at simark dot ca>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>, gdb-patches at sourceware dot org
- Date: Thu, 19 Sep 2019 22:03:22 -0400
- Subject: Re: [RFC] gdb/testsuite: Add framework for running under valgrind
- References: <20190919042427.589-1-andrew.burgess@embecosm.com>
On 2019-09-19 12:24 a.m., Andrew Burgess wrote:
> This work isn't ready to be merged yet, but I wanted to share what I
> had an get feedback.
>
> Do people think this is something worth having the testsute?
>
> What additonal features would need adding to make this really useful?
>
> All feedback welcome,
>
> Thanks,
> Andrew
Hi Andrew,
I think this is great. I don't really mind how it's implemented under the hood,
hopefully Philippe and you can agree on which is the best solution. I guess this
reporting is more for reporting leaks than invalid memory accesses, since invalid
memory accesses under valgrind cause the process to die, so you'd probably see it
as a test failure anyway.
A future improvement could also be to run gdbserver under valgrind when using
a board file that's gdbserver-based.
About leaks reported by valgrind, I am always wondering what we should do with allocations
that are made once for the whole lifetime of GDB. Should we try to free them before exiting?
It might not be necessary, but an argument for free'ing them would be that they add noise to
the valgrind output, and may hide some more serious leaks.
Simon