develooper Front page | perl.perl5.porters | Postings from February 2015

[perl #123840] hang in re_intuit_start

Thread Previous | Thread Next
From:
Hugo van der Sanden
Date:
February 15, 2015 18:04
Subject:
[perl #123840] hang in re_intuit_start
Message ID:
rt-4.0.18-28633-1424023422-1000.123840-75-0@perl.org
# New Ticket Created by  Hugo van der Sanden 
# Please include the string:  [perl #123840]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=123840 >


AFL (<http://lcamtuf.coredump.cx/afl/>) is finding multiple variants of this:

  ./miniperl -Dr -e 'qq{\x{100}a\x{80}a} =~ m{w\z\R\z}i

.. which gets lost in a hard loop in re_intuit_start:

Compiling REx "w\z\R\z"
rarest char 
 at 0
rarest char 
 at 0
Final program:
   1: EXACTFU <w> (3)
   3: EOS (4)
   4: LNBREAK (5)
   5: EOS (6)
   6: END (0)
anchored ""$ at 1 floating ""$ at 2..3 (checking floating) stclass EXACTFU <w> m
inlen 2 
Enabling $` $& $' support (0x7).

EXECUTING...

Matching REx "w\z\R\z" against "%x{100}a%x{80}a"
UTF-8 string...
Intuit: trying to determine minimum start position...
rarest char 
 at 0
rarest char 
 at 0
  Found floating substr ""$ at offset 6...
  Found anchored substr ""$ at offset 5...
  (multiline anchor test skipped)
  looking for class: start_shift: 2 check_at: 6 rx_origin: 3 endpos: 5
  This position contradicts STCLASS...
  Looking for anchored substr starting at offset 6...
  Found anchored substr ""$ at offset 5...
  (multiline anchor test skipped)
  looking for class: start_shift: 2 check_at: 6 rx_origin: 3 endpos: 5
  This position contradicts STCLASS...
[...]

Hugo


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About