bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] bug: {m, re}alloc expects live pointers form {m, re}all


From: Bruno Haible
Subject: Re: [bug-gnulib] bug: {m, re}alloc expects live pointers form {m, re}alloc(0) (patch included)
Date: Tue, 6 Sep 2005 13:09:27 +0200
User-agent: KMail/1.5

Hi,

> The xmalloc and xrealloc functions defined in lib/xmalloc.c expect live
> pointers to be always returned form system's malloc and realloc
> function. This is an invalid assumption for most (all?) libc
> implementations ...

This was fixed in gnulib by Paul Eggert:

2004-05-30  Paul Eggert  <address@hidden>

        * xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
        macros to be defined.
        (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
        the allocator returns NULL because the requested size is zero.

You only need to use the new gnulib xmalloc.c instead of the one you found
in diffutils.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]