This is the mail archive of the
mailing list for the GDB project.
Re: [resubmit] memory leak, mi-cmd-var
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: msnyder at sonic dot net
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 29 Jun 2007 17:16:17 +1200
- Subject: Re: [resubmit] memory leak, mi-cmd-var
- References: <firstname.lastname@example.org>
> I left the test for NULL in place, because I can't convince myself
> that it is un-necessary.
mi_cmd_var_set_format (char *command, char **argv, int argc) is called like
main (char **argv, int argc). So if argc=2, which it must be at this point,
then argv can't be NULL can it? If it is, there must be something seriously
wrong with the arguments of its caller, mi_cmd_execute (elements of struct
mi_parse *parse), and other MI commands will surely fail too.
> Therefore the conservative approach is to
> leave it in. I've moved it to earlier so that if it's goint to error,
> we won't do unnecessary work.
The conservative approach would be to wait until after the release, or at
least the branch/branchpoint.
In Emacs we went through a similar process before the release. Dan Nicolaescu
reviewed the error list and submitted errors that he thought might cause
problems. Members of the mailing list would comment as to whether they thought
a change was need or not. Patches were only submitted once it was agreed that
there was a potential problem. At least that's my recollection - I didn't get