Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Apr 2017 14:48:04 -0500
From:      Kyle Evans <kevans91@ksu.edu>
To:        "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
Cc:        Conrad Meyer <cem@freebsd.org>, <svn-src-head@freebsd.org>, <svn-src-all@freebsd.org>, src-committers <src-committers@freebsd.org>, Dimitry Andric <dim@freebsd.org>
Subject:   Re: svn commit: r316492 - in head/usr.bin/grep: . regex
Message-ID:  <CACNAnaFPoj8d=DpEbeyNj9ECGzuVRWo4S-HR7%2BDyB74HACoF=g@mail.gmail.com>
In-Reply-To: <2CA2F0F0-17E4-4E9F-BDD6-10EDFECDB679@gmail.com>
References:  <201704041608.v34G8qSo055328@repo.freebsd.org> <4D675D2F-7D6F-4AF2-AE10-5DF19D4158D0@gmail.com> <B9C5AC3B-1775-4D5D-ADA7-C6CE091F32F5@FreeBSD.org> <CAG6CVpVQ1pFdeCg-OJNGcGd1rbJ1CMDEyfEa3FWd9HEsrSfrUw@mail.gmail.com> <2CA2F0F0-17E4-4E9F-BDD6-10EDFECDB679@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 4, 2017 at 2:45 PM, Ngie Cooper (yaneurabeya) <
yaneurabeya@gmail.com> wrote:

>
> > On Apr 4, 2017, at 12:04, Conrad Meyer <cem@freebsd.org> wrote:
> >
> > On Tue, Apr 4, 2017 at 11:56 AM, Dimitry Andric <dim@freebsd.org> wrote=
:
> >> On 4 Apr 2017, at 19:14, Ngie Cooper (yaneurabeya) <
> yaneurabeya@gmail.com> wrote:
> >>> Where did xmalloc.c originate from?
> >>
> >> GNU.
> >
> > I believe this to be completely incorrect.
> >
> >> Almost all software from the GNU project relies on malloc wrappers
> >> which abort the program on allocation failures.
> >
> > That is not what bsdgrep's xmalloc() did, if you read the code. It
> > simply tracks all allocations for basic leak analysis.
> >
> > Abort on allocation failure would be a perfectly reasonable behavior
> > for bsdgrep(1), too.
>
> There are multiple, competing definitions floating around the internet. I
> was genuinely curious where this variant came from because I wanted to ma=
ke
> sure we weren=E2=80=99t just zapping a file that some upstream uses somew=
here, in
> the event we were going to bring down further updates, again, from said
> upstream source.


FWIW- I did scour the internet for other bsdgrep implementations and did
not find a trace of this in any of the others that I found, to include the
OS X implementation. In fact, as I recall, most of them didn't even have
the regex/ bits that we do, presumably they were using regex(3) but it's
been a while since I was poking around.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaFPoj8d=DpEbeyNj9ECGzuVRWo4S-HR7%2BDyB74HACoF=g>