bug-gnulib
[Top][All Lists]
Advanced

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

Re: Bug Report: sed-4.1.4 misinterprets uClibc's malloc (patch included)


From: Yuri Vasilevski
Subject: Re: Bug Report: sed-4.1.4 misinterprets uClibc's malloc (patch included)
Date: Thu, 25 Aug 2005 22:57:59 -0500

Hi

On Thu, 25 Aug 2005 12:49:37 -0700
Paul Eggert <address@hidden> wrote:

> Yuri Vasilevski <address@hidden> writes:
> 
> > Recent versions of sed expect glibc behavior form malloc, i.e.
> > malloc(0) return live pointer. This is not true for uClibc (and many
> > other old/classical libc implementations).
> 
> Thanks, but I'd rather not go through the glibc regex implementation
> looking for other instances of this problem; it will be a maintenance
> and reliability hassle.

Personally I think that it may be safer to code in terms of standard
malloc as it's behavior is much more widely implemented and in my
opinion saner, but I understand all the trouble it'll be to check
each malloc regex code.

Also glibc's realloc return NULL if size == 0, so in the places where
realloc is used in regex the case of NULL pointers most be taken care
off in any way.

> Instead, let's substitute a malloc that behaves compatibly with GNU
> malloc.

Thanks for addressing this issue.

Yuri.

PS: I'm not in the CCed lists so I'm not sure this message will get
    posted to them.





reply via email to

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