Date: Thu, 3 Sep 1998 20:02:58 +0300 (EEST) From: archer@lucky.net To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: gnu/7821: awk in free(): warning: chunk is already free. Message-ID: <199809031702.UAA23159@grape.carrier.kiev.ua>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809031702.UAA23159>
