svn commit: r316492 - in head/usr.bin/grep: . regex

Ngie Cooper (yaneurabeya) yaneurabeya at gmail.com
Wed Apr 5 02:22:01 UTC 2017


> On Apr 4, 2017, at 19:21, Pedro Giffuni <pfg at FreeBSD.org> wrote:
> 
>> On Apr 4, 2017, at 14:48, Kyle Evans <kevans91 at ksu.edu> wrote:
>> 
>> On Tue, Apr 4, 2017 at 2:45 PM, Ngie Cooper (yaneurabeya) <yaneurabeya at gmail.com> wrote:
>> 
>> > On Apr 4, 2017, at 12:04, Conrad Meyer <cem at freebsd.org> wrote:
>> >
>> > On Tue, Apr 4, 2017 at 11:56 AM, Dimitry Andric <dim at freebsd.org> wrote:
>> >> On 4 Apr 2017, at 19:14, Ngie Cooper (yaneurabeya) <yaneurabeya at 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 make sure we weren’t 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.
>> 
>> 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

So…. Gabor added xmalloc then ;p…
-Ngie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20170404/c536e7a0/attachment.sig>


More information about the svn-src-head mailing list