| Summary: | gawk generates defunct output | ||
|---|---|---|---|
| Product: | Base System | Reporter: | dirk.meyer <dirk.meyer> |
| Component: | gnu | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 3.2-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->closed Duplicate of gnu/7821. |
regression checks with cnews fail due a problem in gawk 3.0.3 the test runs fine with gawk 2.15 under FreeBSD-2.2.8-RELEASE Fix: Update to gawk 3.0.4, which has serveral Memory problems fixed How-To-Repeat: extract the archive, run gawkbug.sh # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # gawkbug.err # gawkbug.in # gawkbug.out # gawkbug.sh # gawkbug.target # echo x - gawkbug.err sed 's/^X//' >gawkbug.err << 'END-of-gawkbug.err' Xawk in free(): warning: chunk is already free. Xawk in free(): warning: chunk is already free. Xawk in free(): warning: chunk is already free. Xawk in free(): warning: chunk is already free. Xawk in free(): warning: chunk is already free. Xawk in free(): warning: chunk is already free. Xawk in free(): warning: chunk is already free. Xawk in free(): warning: chunk is already free. Xawk in free(): warning: chunk is already free. Xawk in free(): warning: chunk is already free. Xawk in free(): warning: chunk is already free. X3,10c3,10 X< barf/puke - - X< bletch - - X< control - - X< foo 103 98 X< junk - - X< mod/mod 13 13 X< mod/unmod 16 16 X< urp 7 7 X--- X> 0 - - X> 6.65422552364e-316 - - X> 0 - - X> 1.00000002991 1.00000002991 1.00000002991 X> 1.00000002991 1.00000002991 1.00000002991 X> 1.00000002991 1.00000002991 1.00000002991 X> 1.00000002991 1.00000002991 1.00000002991 X> 1.00000002991 1.00000002991 1.00000002991 END-of-gawkbug.err echo x - gawkbug.in sed 's/^X//' >gawkbug.in << 'END-of-gawkbug.in' Xbar/.: Xugh X Xbar/ugh/.: X99 X Xbarf/puke/.: X Xbletch/.: X Xcontrol/.: X Xfoo/.: X98 X101 X103 X Xjunk/.: X Xmod/mod/.: X13 X Xmod/unmod/.: X16 X Xurp/.: X7 X/.: END-of-gawkbug.in echo x - gawkbug.out sed 's/^X//' >gawkbug.out << 'END-of-gawkbug.out' Xbar - - Xbar/ugh 99 99 X0 - - X6.65422552364e-316 - - X0 - - X1.00000002991 1.00000002991 1.00000002991 X1.00000002991 1.00000002991 1.00000002991 X1.00000002991 1.00000002991 1.00000002991 X1.00000002991 1.00000002991 1.00000002991 X1.00000002991 1.00000002991 1.00000002991 END-of-gawkbug.out echo x - gawkbug.sh sed 's/^X//' >gawkbug.sh << 'END-of-gawkbug.sh' X#! /bin/sh Xcat gawkbug.in | X awk -F' ' 'BEGIN { X OFMT = "%.12g" X big = 99999999999 X lowest = big X small = 0 X highest = small X dir = "" X } X $0 ~ /^[0-9]+$/ { X # some old awks do not think $0 is numeric, so use $1 X if ($1 < lowest) X lowest = $1 X if ($1 > highest) X highest = $1 X next X } X $0 ~ /\/\.:$/ { X if (dir != "") { X if (highest != small) X print dir, highest, lowest X else X print dir, "-", "-" X } X dir = substr($0, 1, length($0)-3) # trim off /.: X lowest = big X highest = small X }' >gawkbug.out Xdiff gawkbug.target gawkbug.out X# eof END-of-gawkbug.sh echo x - gawkbug.target sed 's/^X//' >gawkbug.target << 'END-of-gawkbug.target' Xbar - - Xbar/ugh 99 99 Xbarf/puke - - Xbletch - - Xcontrol - - Xfoo 103 98 Xjunk - - Xmod/mod 13 13 Xmod/unmod 16 16 Xurp 7 7 END-of-gawkbug.target exit