Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21713 - GNU Awk 3.1.2 bug with multiline records
Summary: GNU Awk 3.1.2 bug with multiline records
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Brandon Low (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-26 11:22 UTC by Jukka Salmi
Modified: 2003-06-23 16:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jukka Salmi 2003-05-26 11:22:32 UTC
GNU Awk 3.1.2 has problems when parsing multiline records. see "Steps to
Reproduce" for details.

Reproducible: Always
Steps to Reproduce:
$ od -c data
0000000   a  \n  \n   b  \n  \n   c  \n
0000010
$ cat pr.awk
BEGIN { RS = "" }
{ printf("%d: %s\n", NR, $0) }
END { print NR }
$ cat data | awk -f pr.awk
1: a
2: b
2
Actual Results:  
the last record (#3, containing 'c') is not printed

Expected Results:  
record #3 should be printed...

i sent a bug report regarding this problem to bug-gawk@gnu.org. stepan kasal
sent me a patch which fixes the problem. it's available from
http://www.math.cas.cz/~kasal/gawk/gawk-3.1.2-rsnull2d.patch.gz

i'm not sure wether any of the core utilities depend on multiline records or
not, so i file this report with severity "major".
Comment 1 Jukka Salmi 2003-05-27 09:08:08 UTC
arnold robbins - the maintainer and developer of gnu awk - said (regarding the multiline records problem):

  "This bug is only in 3.1.2, it is a bug. For now, the solution is to move       
   back to 3.1.1.  I am working on 3.1.3 and hope to release it "soon",           
   which will fix the problem."
Comment 2 Brandon Low (RETIRED) gentoo-dev 2003-05-31 22:47:28 UTC
Az: think we should back down the stable version and wait for 3.1.3?
Comment 3 Jukka Salmi 2003-06-01 09:49:33 UTC
yes.
Comment 4 Brandon Low (RETIRED) gentoo-dev 2003-06-08 15:53:42 UTC
marked unstable.  Will wait for 3.1.3 for a new stable gawk.
Comment 5 Jukka Salmi 2003-06-23 01:22:00 UTC
And now it's marked stable again, still containing the bug... ???
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2003-06-23 13:14:45 UTC
Apply patch or mask again ?  Maybe do a new revision of 3.1.1 afterwards ?
Comment 7 Jukka Salmi 2003-06-23 14:32:40 UTC
I'd mask it again, because of Arnold Robbins statement. But I'm not sure if no other packages depend on functionality added to Awk between 3.1.1 and 3.1.2...
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2003-06-23 16:20:37 UTC
Nope, latest revision 3.1.1 have filefuncs.so in.