[pcre-dev] [Bug 1035] New: Nested named refs do not work

Góra strony
Delete this message
Autor: BG
Data:  
Dla: pcre-dev
Temat: [pcre-dev] [Bug 1035] New: Nested named refs do not work
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1035
           Summary: Nested named refs do not work
           Product: PCRE
           Version: 8.10
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: overlordq@???
                CC: pcre-dev@???



I'll go backwards in order here, and start with the end and discovered that
named nested references do not work.

thedarkcitadel:/tmp/pcre-8.10# ./pcretest
PCRE version 8.10 2010-06-25

re> /(?P<abn>(?P=abn)xxx)/

Failed: internal error: code overflow at offset 20

This, we discovered after reducing a test case from the full regex:

/^(?:::|:(?::([0-9A-Fa-f]{1,4})){1,7}|([0-9A-Fa-f]{1,4})(?::([0-9A-Fa-f]{1,4})){0,6}::|([0-9A-Fa-f]{1,4})(?::([0-9A-Fa-f]{1,4})){7}|([0-9A-Fa-f]{1,4})(?::(?P<abn>(?!(?P=abn)):(?P<iabn>))?([0-9A-Fa-f]{1,4})){1,6}(?P=iabn))(?:\/(12[0-8]|1[01][0-9]|[1-9]?\d))?$/

which causes a . . . wait for it . . .

*** glibc detected *** /tmp/pcre-8.10/.libs/lt-pcretest: double free or
corruption (out): 0x00000000009b0af0 ***
======= Backtrace: =========
/lib/libc.so.6(+0x71ad6)[0x7f33c459ead6]
/lib/libc.so.6(cfree+0x6c)[0x7f33c45a384c]
/tmp/pcre-8.10/.libs/libpcre.so.0(pcre_compile2+0xa40)[0x7f33c4897140]
/tmp/pcre-8.10/.libs/lt-pcretest[0x404654]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f33c454bc4d]
/tmp/pcre-8.10/.libs/lt-pcretest[0x401769]
======= Memory map: ========
00400000-0040a000 r-xp 00000000 ca:00 76251                             
/tmp/pcre-8.10/.libs/lt-pcretest
0060a000-0060b000 rw-p 0000a000 ca:00 76251                             
/tmp/pcre-8.10/.libs/lt-pcretest
0098c000-009b9000 rw-p 00000000 00:00 0                                  [heap]
7f33c0000000-7f33c0021000 rw-p 00000000 00:00 0
7f33c0021000-7f33c4000000 ---p 00000000 00:00 0
7f33c4317000-7f33c432d000 r-xp 00000000 ca:00 369837                    
/lib/libgcc_s.so.1
7f33c432d000-7f33c452c000 ---p 00016000 ca:00 369837                    
/lib/libgcc_s.so.1
7f33c452c000-7f33c452d000 rw-p 00015000 ca:00 369837                    
/lib/libgcc_s.so.1
7f33c452d000-7f33c4685000 r-xp 00000000 ca:00 1771                      
/lib/libc-2.11.2.so
7f33c4685000-7f33c4884000 ---p 00158000 ca:00 1771                      
/lib/libc-2.11.2.so
7f33c4884000-7f33c4888000 r--p 00157000 ca:00 1771                      
/lib/libc-2.11.2.so
7f33c4888000-7f33c4889000 rw-p 0015b000 ca:00 1771                      
/lib/libc-2.11.2.so
7f33c4889000-7f33c488e000 rw-p 00000000 00:00 0
7f33c488e000-7f33c48a9000 r-xp 00000000 ca:00 5406                      
/tmp/pcre-8.10/.libs/libpcre.so.0.0.1
7f33c48a9000-7f33c4aa8000 ---p 0001b000 ca:00 5406                      
/tmp/pcre-8.10/.libs/libpcre.so.0.0.1
7f33c4aa8000-7f33c4aa9000 rw-p 0001a000 ca:00 5406                      
/tmp/pcre-8.10/.libs/libpcre.so.0.0.1
7f33c4aa9000-7f33c4aab000 r-xp 00000000 ca:00 5833                      
/tmp/pcre-8.10/.libs/libpcreposix.so.0.0.0
7f33c4aab000-7f33c4caa000 ---p 00002000 ca:00 5833                      
/tmp/pcre-8.10/.libs/libpcreposix.so.0.0.0
7f33c4caa000-7f33c4cab000 rw-p 00001000 ca:00 5833                      
/tmp/pcre-8.10/.libs/libpcreposix.so.0.0.0
7f33c4cab000-7f33c4cc9000 r-xp 00000000 ca:00 2114                      
/lib/ld-2.11.2.so
7f33c4eb3000-7f33c4eb6000 rw-p 00000000 00:00 0
7f33c4ec4000-7f33c4ec8000 rw-p 00000000 00:00 0
7f33c4ec8000-7f33c4ec9000 r--p 0001d000 ca:00 2114                      
/lib/ld-2.11.2.so
7f33c4ec9000-7f33c4eca000 rw-p 0001e000 ca:00 2114                      
/lib/ld-2.11.2.so
7f33c4eca000-7f33c4ecb000 rw-p 00000000 00:00 0
7fffb8fab000-7fffb8fcc000 rw-p 00000000 00:00 0                         
[stack]
7fffb8fff000-7fffb9000000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                 
[vsyscall]
Aborted



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