[Top][All Lists]

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

Re: malloc(0) problem again

From: Ralf Wildenhues
Subject: Re: malloc(0) problem again
Date: Sun, 26 Apr 2009 22:38:22 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Bruno,

* Bruno Haible wrote on Sun, Apr 26, 2009 at 12:27:44PM CEST:
> Unit tests revealed that some Unicode string functions were dependent on
> the result of malloc(0). This fixes it, and documents the portability problem.

This looks fishy.  AC_FUNC_MALLOC should define malloc to rpl_malloc and
the code from the malloc module should be used and fix this issue, no?


> 2009-04-26  Bruno Haible  <address@hidden>
>       Avoid test failures on AIX and OSF/1.
>       * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Avoid calling
>       malloc(0).
>       * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
>       * lib/unilbrk/ulc-possible-linebreaks.c (ulc_possible_linebreaks):
>       Likewise.
>       * lib/unilbrk/ulc-width-linebreaks.c (ulc_width_linebreaks): Likewise.
>       * lib/uniwbrk/ulc-wordbreaks.c (ulc_wordbreaks): Likewise.
>       * lib/uniconv/u-conv-to-enc.h (FUNC): Likewise. Fix memory leak.
>       * lib/unistr/u-cpy-alloc.h (FUNC): Call malloc(1) instead of malloc(0).
>       * doc/posix-functions/malloc.texi: Document the portability problem
>       related to malloc(0).

reply via email to

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