From owner-freebsd-bugs Thu Sep 3 10:30:12 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA19797 for freebsd-bugs-outgoing; Thu, 3 Sep 1998 10:30:12 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA19735 for ; Thu, 3 Sep 1998 10:30:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id KAA03942; Thu, 3 Sep 1998 10:30:01 -0700 (PDT) Received: from burka.carrier.kiev.ua (burka.carrier.kiev.ua [193.193.193.107]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA19299 for ; Thu, 3 Sep 1998 10:27:54 -0700 (PDT) (envelope-from archer@grape.carrier.kiev.ua) Received: from kozlik.carrier.kiev.ua (kozlik.carrier.kiev.ua [193.193.193.111]) by burka.carrier.kiev.ua (8.9.0/8.Who.Cares) with ESMTP id UAA01644 for ; Thu, 3 Sep 1998 20:26:39 +0300 (EEST) Received: (from uucp@localhost) by kozlik.carrier.kiev.ua (8.9.0/8.9.0/8.Who.Cares) with UUCP id UAA20277 for FreeBSD-gnats-submit@freebsd.org; Thu, 3 Sep 1998 20:21:41 +0300 (EEST) Received: (from archer@localhost) by grape.carrier.kiev.ua (8.9.1/8.8.8) id UAA23159; Thu, 3 Sep 1998 20:02:58 +0300 (EEST) (envelope-from archer) Message-Id: <199809031702.UAA23159@grape.carrier.kiev.ua> Date: Thu, 3 Sep 1998 20:02:58 +0300 (EEST) From: archer@lucky.net Reply-To: archer@lucky.net To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: gnu/7821: awk in free(): warning: chunk is already free. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 7821 >Category: gnu >Synopsis: awk in free(): warning: chunk is already free. >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 3 10:30:00 PDT 1998 >Last-Modified: >Originator: Alexander Litvin >Organization: Lucky Net ltd. >Release: FreeBSD 3.0-CURRENT i386 >Environment: FreeBSD grape.carrier.kiev.ua 3.0-CURRENT FreeBSD 3.0-CURRENT #121: Thu Sep 3 1 1:21:44 EEST 1998 archer@grape.carrier.kiev.ua:/usr/src/sys/compile/GRAPE i 386 >Description: The problem first appeared when GNU awk in 3.0-CURRENT was apgraded to 3.0.3. I run C-News, which uses awk extensively. After awk apgrade C-News expire stopped to work. It appeared that some GNU awk 3.0.3 programms when given absolutely legitimate input fail, giving out a number of messages: awk in free(): warning: chunk is already free. >How-To-Repeat: Run the following awk program (it is cut out of C-News expire scripts). I was not able to cut it down more -- omitting some portions of the code (e.g. OFMT line), make error go away in this case, though it certainly does not fix awk. ----------------cut-here---------------- #!/usr/bin/awk -f BEGIN { OFMT = "%.12g" big = 99999999999 lowest = big small = 0 highest = small } $0 ~ /^[0-9]+$/ { if ($1 < lowest) lowest = $1 if ($1 > highest) highest = $1 next } $0 ~ /^[a-z]+/ { print dir, highest, lowest dir = $0 lowest = big highest = small } ----------------cut-here---------------- To get the error, just give this script the following input: ----------------cut-here---------------- a 1 b ----------------cut-here---------------- >Fix: I was not able to track the error in awk sources. As a workaround, I just reverted to GNU awk 2.15.5. >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message