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


   Date: Tue, 11 Apr 2000 07:45:28 -0400 (EDT)
   From: Eli Zaretskii <eliz@delorie.com>

   > 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.

The idea is that GDB assumes an ISO C *compiler*, the rationale being
that you can always use GCC.  However, the C library doesn't have to
be ISO C compliant, and there isn't that much one can do abou that.

Mark

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