Re: [PATCH 00/40] add cleanup checker and fix cleanup bugs

Phil Muldoon
2013-05-09T21:21:08Z

On 09/05/13 19:47, Tom Tromey wrote:
> This series adds a cleanup checker and then fixes most of the bugs it
> notices.
>
> The series as a whole was built and regression-tested on x86-64 Fedora
> 18. However, there are a couple of patches that I could not test;
> e.g., the machoread.c patch. I would appreciate it if someone could
> try these on their machine. The branch is archer.git tromey/cleanup-checker.
>
> In most cases the patches are pretty obvious. I kept them short for
> ease of reading.
>
> The cleanup checker itself is described in patch #1. This patch also
> describes some of the
>
> After this series, there are still some cleanup-related bugs noticed
> by the checker. One of these (in dwarf2read.c) is a false report --
> the checker is not perfect and there was no nice workaround here.
>
>
> The remaining errors are:

Thanks for doing this, I think it is awesome. I am not going to
comment on the other thirty nine patches as the fixes are largely
mechanical in nature.

My questions refer to future cleanup issues.

As evidenced by the mail on gdb@sourceware.org on clean-up issues, I am
more interested in how your contribution can work toward future
cleanup errors.

Will your cleanup checker run as part of the normal build?

(or testsuite)?

(or ARI)?

Or will it be a manual thing?

If it is manual, can it be made automatic?

I really like the idea of automatic approaches for catching errors
like these. If possible I think it should be part of the everyday
build process (assuming one has Python installed).

Given the number of errors this tool identified, I think these are
common logic errors?

What, if any, are the limitations of this, and other, GCC plugins to
fixing common GDB patterns of errors in a common build scenario?

Cheers,

Phil