From owner-freebsd-current@FreeBSD.ORG Tue Oct 5 17:03:11 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 606D616A4CE for ; Tue, 5 Oct 2004 17:03:11 +0000 (GMT) Received: from mail2.numachi.com (mail2.numachi.com [198.175.254.8]) by mx1.FreeBSD.org (Postfix) with SMTP id 933CA43D2F for ; Tue, 5 Oct 2004 17:03:10 +0000 (GMT) (envelope-from reichert@numachi.com) Received: (qmail 84593 invoked from network); 5 Oct 2004 17:03:09 -0000 Received: from natto.numachi.com (198.175.254.216) by mail2.numachi.com with SMTP; 5 Oct 2004 17:03:09 -0000 Received: (qmail 42666 invoked by uid 1001); 5 Oct 2004 17:03:09 -0000 Date: Tue, 5 Oct 2004 13:03:09 -0400 From: Brian Reichert To: Joseph Koshy Message-ID: <20041005170309.GC262@numachi.com> References: <20041004171422.GK262@numachi.com> <84dead72041004191479cb774a@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <84dead72041004191479cb774a@mail.gmail.com> User-Agent: Mutt/1.5.6i cc: freebsd-current@freebsd.org Subject: Re: awk leaking memory during arithmetic? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2004 17:03:11 -0000 On Tue, Oct 05, 2004 at 02:14:07AM +0000, Joseph Koshy wrote: > > I note that 5.2.1 and 4.10 are using different versions of awk. > > > > Are these awk bugs, or am I misusing awk? The memory consumption > > under 5.2.1 is what concerns me the most. I'll open a PR, if that's > > It does look like an awk bug: Others have revealed that I was misusing awk. The weird behaviors of both awks are caused by me having fed a huge number to the field counter ( 't' vs '$t'). As to what (either of the implementations of) awk should do when fed garbage, is unspecified. I prefered GNU awk's (under 4.10) behavior better, in that it died much quicker, without filling my partition with a huge core file. :) -- Brian Reichert 37 Crystal Ave. #303 Daytime number: (603) 434-6842 Derry NH 03038-1713 USA BSD admin/developer at large