bin/143362: awk(1) incorrect matching

Mikolaj Golub to.my.trociny at gmail.com
Sat Jan 30 09:00:03 UTC 2010


>Number:         143362
>Category:       bin
>Synopsis:       awk(1) incorrect matching
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 30 09:00:02 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Mikolaj Golub
>Release:        FreeBSD zhuzha.ua1 8.0-STABLE FreeBSD 8.0-STABLE #6: Sun Jan 24 21:36:17 EET 2010     root at zhuzha.ua1:/usr/obj/usr/src/sys/GENERIC  i386
>Organization:
>Environment:
>Description:
This problem with awk(1) was reported to NetBSD by Aleksey Cheusov

http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=33392

The same issue is under FreeBSD:

The following program
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#!/usr/bin/awk -f


/^[^_][^ ]*_NNIFO([ ]+[^_][^ ]*_(CC|INR|JJFO|JJMA|JJPG|NNIFG|NNIFO|NNIMPG|NNIMR|NNING|PP3FD|PQINO|PQMO|PSFR|RQ|TC|VIIR3|VPIPN|VPLIPF|NOTAG|RQR))*$/
%%%%%%%%%%%%%%%%%%%%% end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


doesn't match the following input


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1_NNIFO 1_PSFR 1_JJFO 1_NNIFO 1_INR 1_NNIMR 1_CC 1_NNING 1_RQ 1_VPLIPF 1_NNIFG 1_JJPG 1_NNIMPG 1_PQINO 1_VPIPN 1_PP3FD 1_JJMA 1_PQMO 1_TC 1_VIIR3
%%%%%%%%%%%%%%%%%%%%% end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Input is 145 byte in size.
Exactly one space between tokens.

>How-To-Repeat:

>Fix:
It has been fixed in NetBSD so we could use their solution.

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list