This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] gdb/testsuite: Add framework for running under valgrind


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]