[pcre-dev] [Bug 1092] New: OP_RECURSIVE and OP_CLOSE

Góra strony
Delete this message
Autor: Zoltan Herczeg
Data:  
Dla: pcre-dev
Nowe tematy: [pcre-dev] [Bug 1092] OP_RECURSIVE and OP_CLOSE
Temat: [pcre-dev] [Bug 1092] New: OP_RECURSIVE and OP_CLOSE
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1092
           Summary: OP_RECURSIVE and OP_CLOSE
           Product: PCRE
           Version: 8.11
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: hzmester@???
                CC: pcre-dev@???



I had a feeling before that the static analysis generating OP_CLOSE opcodes may
fail when we combine it with OP_RECURSIVE. Now I have a proof:

Pattern: "(?1)(?:(b(*ACCEPT))){0}" Subject: "b"

  0  33 Bra
  3   6 Once
  6  16 Recurse
  9   6 Ket
 12     Skip zero
 13  17 Bra
 16  11 CBra 1
 21  NC b
 23     Close 1
 26     *ACCEPT
 27  11 Ket
 30  17 Ket
 33  33 Ket
 36     End


Capturing brackets result:
0, 1, -1, 1

Could we do something clever in such cases? Looks really difficult to fix this.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email