From owner-svn-src-head@freebsd.org Wed Apr 5 02:20:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C726BD2F2D2 for ; Wed, 5 Apr 2017 02:20:28 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1.freebsd.org (Postfix) with SMTP id A12103F4 for ; Wed, 5 Apr 2017 02:20:28 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: (qmail 87528 invoked by uid 99); 5 Apr 2017 02:20:27 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Apr 2017 02:20:27 +0000 Received: from [192.168.0.104] (unknown [190.157.139.67]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 6FF841A060E; Wed, 5 Apr 2017 02:20:18 +0000 (UTC) From: Pedro Giffuni Message-Id: <25D20383-8A5B-4F78-B8B4-12F9B3521626@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r316492 - in head/usr.bin/grep: . regex Date: Tue, 4 Apr 2017 21:21:08 -0500 In-Reply-To: Cc: "Ngie Cooper (yaneurabeya)" , Conrad Meyer , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Dimitry Andric To: Kyle Evans References: <201704041608.v34G8qSo055328@repo.freebsd.org> <4D675D2F-7D6F-4AF2-AE10-5DF19D4158D0@gmail.com> <2CA2F0F0-17E4-4E9F-BDD6-10EDFECDB679@gmail.com> X-Mailer: Apple Mail (2.3259) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2017 02:20:28 -0000 > On Apr 4, 2017, at 14:48, Kyle Evans wrote: >=20 > On Tue, Apr 4, 2017 at 2:45 PM, Ngie Cooper (yaneurabeya) = > wrote: >=20 > > On Apr 4, 2017, at 12:04, Conrad Meyer > wrote: > > > > On Tue, Apr 4, 2017 at 11:56 AM, Dimitry Andric > wrote: > >> On 4 Apr 2017, at 19:14, Ngie Cooper (yaneurabeya) = > 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. >=20 > There are multiple, competing definitions floating around the = internet. I was genuinely curious where this variant came from because I = wanted to make sure we weren=E2=80=99t just zapping a file that some = upstream uses somewhere, in the event we were going to bring down = further updates, again, from said upstream source. >=20 > 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. Well, for the history of bsdgrep, you have to go back to freegrep: https://jameshoward.us/software/freegrep/ = but the most significant changes are likely to be due to Gabor: https://wiki.freebsd.org/BSDgrep Pedro.