[hardy] [mawk] match() works in exponential time even tough the ~ doesn't

Bug #519243 reported by PapaTom
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mawk (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: mawk

BEGIN {
 comment = "\\/\\*([^*]+|\\*+[^*\\/])+\\*\\/"
 #The more the 'A' characters, the longer match() takes to complete (exponentially).
 line = "/*AAAAAAAAAAAAAAAAAAAAAAAAAAA*/"

 if (line ~ comment) {
  print line " matches " comment
  match(line, comment)
  print "the match is at [" RSTART ".." RSTART + RLENGTH "]"
 }
 else
  print "Does not match"
}

jasio@ubuntu804:~/kernel/junk/perf$ awk -W version
mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan

compiled limits:
max NF 32767
sprintf buffer 1020

Revision history for this message
PapaTom (t-fujak) wrote :

Same for 1.3.3-15 for i386 debian package.

Revision history for this message
Thomas Dickey (dickey-his) wrote :

This is fixed in current release

http://invisible-island.net/mawk/

Changed in mawk (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.