apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: cvs commit: apr/strings apr_cpystrn.c
Date Fri, 17 May 2002 15:27:29 GMT
Ben Laurie <ben@algroup.co.uk> writes:

> trawick@apache.org wrote:
> > 
> > trawick     02/05/17 07:58:27
> > 
> >   Modified:    strings  apr_cpystrn.c
> >   Log:
> >   don't check for malloc() failure in our strdup() replacement
> Errrr - why not?

we're going to get segfaults inside strdup() anyway on some platforms
because we'll segfault when the OS fails to find a free page when we
try to write to it

we're going to get segfaults in the caller of such an allocation
routine because we don't check the retval religously

if there isn't enough storage to satisfy the strdup() it is a broken
environment anyway, and why should we waste the pathlength for the
other 99.9% of the users so that we can possibly trade one symptom of
a broken environment for another?

Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

View raw message