This is the mail archive of the gdb-patches@sourceware.cygnus.com 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]

Re: PATCH/RFA free(NULL) bomb in printcmd.c


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

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