Public bug reported:

The match operator returns an invalid result and fails to correctly set
RSTART and RLENGTH on an unsuccessful match.

Test case courtesy of Alain Ketterlin on the bug-gnu-utils mailing list
at http://lists.gnu.org/archive/html/bug-gnu-utils/2007-07/msg00033.html

{
    r = match($0,/^ */,t);
    print "R=" r " S=" RSTART " L=" RLENGTH;
}

This will print large (garbage) numbers if a blank line is supplied for
input.

Problem observed in version 3.1.5.dfsg-4build1 on amd64, but x86 works
successfully.  It's also fixed in the current CVS.

** Affects: gawk (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

- The match operator fails to correctly set RSTART and RLENGTH on an
- unsuccessful match.
+ The match operator returns an invalid result and fails to correctly set
+ RSTART and RLENGTH on an unsuccessful match.
  
  Test case courtesy of Alain Ketterlin on the bug-gnu-utils mailing list
  at http://lists.gnu.org/archive/html/bug-gnu-utils/2007-07/msg00033.html
  
  {
      r = match($0,/^ */,t);
      print "R=" r " S=" RSTART " L=" RLENGTH;
  }
  
  This will print large (garbage) numbers if a blank line is supplied for
  input.
  
  Problem observed in version 3.1.5.dfsg-4build1 on amd64, but x86 works
  successfully.  It's also fixed in the current CVS.

-- 
match operator broken on amd64
https://bugs.launchpad.net/bugs/127850
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to