PATCH/RFA free(NULL) bomb in printcmd.c
Michael Meissner
meissner@cygnus.com
Tue Apr 11 15:38:00 GMT 2000
On Tue, Apr 11, 2000 at 07:45:28AM -0400, Eli Zaretskii wrote:
>
> > Then again, i dmallocified GDB about a week and a half ago (which was
> > quite a chore, involving dmallocifying libiberty, etc. I got literally
> > every call), and i stopped fixing null pointer frees after about 35th one.
> > So he's really going to be fighting an uphill battle.
>
> Do we really need to fight that battle, though?
>
> IIRC, GDB now assumes ISO C, right? And the C89 standard clearly says
> that "free(NULL);" should be a no-op.
Yes, however there will always exist buggy systems and potentially pre-C89
systems (like SunOS).
--
Michael Meissner, Cygnus Solutions, a Red Hat company.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482
More information about the Gdb-patches
mailing list