21290075 update pcre to version 8.37 s11u2-sru
authorApril Chin <april.chin@oracle.com>
Fri, 10 Jul 2015 08:56:04 -0700
branchs11u2-sru
changeset 4620 e3a4a6201724
parent 4619 ca1d23775800
child 4622 81e27a08826d
21290075 update pcre to version 8.37 20069753 problem in LIBRARY/PCRE 21093256 problem in LIBRARY/PCRE 21179786 problem in LIBRARY/PCRE 21195811 problem in LIBRARY/PCRE 21330611 problem in LIBRARY/PCRE 15417417 SUNBT6594265 man page for pcregrep is missing "Last change:" date
components/pcre/Makefile
components/pcre/patches/01-doc.patch
components/pcre/patches/02-Makefile_in.patch
components/pcre/patches/03-test-driver.patch
components/pcre/patches/04-CVE-2015-3210.patch
components/pcre/patches/05-CVE-2015-3217.patch
components/pcre/patches/06-CVE-2015-5073.patch
components/pcre/patches/Makefile.in.patch
components/pcre/patches/doc.patch
components/pcre/patches/pcre_compile.patch
components/pcre/pcre.license
components/pcre/pcre.p5m
--- a/components/pcre/Makefile	Tue Jun 23 14:24:18 2015 -0700
+++ b/components/pcre/Makefile	Fri Jul 10 08:56:04 2015 -0700
@@ -19,17 +19,17 @@
 # CDDL HEADER END
 
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		pcre
-COMPONENT_VERSION=	8.21
+COMPONENT_VERSION=	8.37
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:62e1116549ce5b1ad92901f04d8338d5f7b59f92abce8d15e9a17cafe0efb102
+    sha256:19d490a714274a8c4c9d131f651489b8647cdb40a159e9fb7ce17ba99ef992ab
 COMPONENT_ARCHIVE_URL=	http://sourceforge.net/projects/pcre/files/pcre/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
 COMPONENT_PROJECT_URL=  http://pcre.org/
 COMPONENT_BUGDB=	library/pcre
@@ -106,6 +106,8 @@
 
 COMPONENT_BUILD_ARGS+=	-e
 
+ASLR_MODE = $(ASLR_ENABLE)
+
 COMPONENT_INSTALL_ARGS+=	"INSTALL=$(INSTALL)"
 COMPONENT_INSTALL_ARGS+=	"MAKE=$(GMAKE)"
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pcre/patches/01-doc.patch	Fri Jul 10 08:56:04 2015 -0700
@@ -0,0 +1,27 @@
+# Update doc files regarding JIT support on Solaris.
+# Patch was developed in-house and is not appropriate for upstream.
+
+--- pcre-8.37-orig/doc/pcrejit.3	Fri Jan 31 06:31:55 2014
++++ pcre-8.37/doc/pcrejit.3	Fri May  8 09:29:37 2015
+@@ -44,6 +44,8 @@
+   SPARC 32-bit (experimental)
+ .sp
+ If --enable-jit is set on an unsupported platform, compilation fails.
++.sp
++JIT support is not available on Solaris.
+ .P
+ A program that is linked with PCRE 8.20 or later can tell if JIT support is
+ available by calling \fBpcre_config()\fP with the PCRE_CONFIG_JIT option. The
+diff -ru pcre-8.37-orig/doc/html/pcrejit.html pcre-8.37/doc/html/pcrejit.html
+--- pcre-8.37-orig/doc/html/pcrejit.html	Tue Apr 28 04:37:57 2015
++++ pcre-8.37/doc/html/pcrejit.html	Fri May  8 09:29:37 2015
+@@ -69,6 +69,9 @@
+ If --enable-jit is set on an unsupported platform, compilation fails.
+ </P>
+ <P>
++JIT support is not available on Solaris.
++</P>
++<P>
+ A program that is linked with PCRE 8.20 or later can tell if JIT support is
+ available by calling <b>pcre_config()</b> with the PCRE_CONFIG_JIT option. The
+ result is 1 when JIT is available, and 0 otherwise. However, a simple program
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pcre/patches/02-Makefile_in.patch	Fri Jul 10 08:56:04 2015 -0700
@@ -0,0 +1,17 @@
+# Patch was developed in-house and is not appropriate for upstream.
+
+--- pcre-8.37-orig/Makefile.in	Tue Apr 28 04:37:57 2015
++++ pcre-8.37/Makefile.in	Fri May  8 14:57:44 2015
+@@ -782,9 +782,9 @@
+ EXEEXT = @EXEEXT@
+ EXTRA_LIBPCRE16_LDFLAGS = @EXTRA_LIBPCRE16_LDFLAGS@
+ EXTRA_LIBPCRE32_LDFLAGS = @EXTRA_LIBPCRE32_LDFLAGS@
+-EXTRA_LIBPCRECPP_LDFLAGS = @EXTRA_LIBPCRECPP_LDFLAGS@
+-EXTRA_LIBPCREPOSIX_LDFLAGS = @EXTRA_LIBPCREPOSIX_LDFLAGS@
+-EXTRA_LIBPCRE_LDFLAGS = @EXTRA_LIBPCRE_LDFLAGS@
++EXTRA_LIBPCRECPP_LDFLAGS = @CXXFLAGS@ @LDFLAGS@
++EXTRA_LIBPCREPOSIX_LDFLAGS = @LDFLAGS@
++EXTRA_LIBPCRE_LDFLAGS = @LDFLAGS@
+ FGREP = @FGREP@
+ GCOV_CFLAGS = @GCOV_CFLAGS@
+ GCOV_CXXFLAGS = @GCOV_CXXFLAGS@
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pcre/patches/03-test-driver.patch	Fri Jul 10 08:56:04 2015 -0700
@@ -0,0 +1,19 @@
+Comment out the set -u (nounset) shell option in test-driver,
+which errors out when encountering unset variables.
+During "gmake test" the pcregrep binary is never called because it
+causes a problem in the pcregrep libtool wrapper for
+an unset variable $libtool_install_magic.
+Problem is not seen when running "gmake check" directly from
+command line.  Solaris-specific patch not appropriate for upstream.
+
+--- pcre-8.37-orig/test-driver	2015-04-28 04:17:22.000000000 -0700
++++ pcre-8.37/test-driver	2015-06-19 11:43:59.905679371 -0700
+@@ -29,7 +29,7 @@ scriptversion=2013-07-13.22; # UTC
+ 
+ # Make unconditional expansion of undefined variables an error.  This
+ # helps a lot in preventing typo-related bugs.
+-set -u
++# set -u
+ 
+ usage_error ()
+ {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pcre/patches/04-CVE-2015-3210.patch	Fri Jul 10 08:56:04 2015 -0700
@@ -0,0 +1,456 @@
+Patch from upstream:
+http://vcs.pcre.org/pcre?view=revision&revision=1558
+to fix CVE-2015-3210 in this upstream bug:
+https://bugs.exim.org/show_bug.cgi?id=1636
+
+Must also include the other commits to pcre_compile.c since 8.37;
+otherwise, a test case fails.
+http://vcs.pcre.org/pcre?view=revision&revision=1555
+http://vcs.pcre.org/pcre?view=revision&revision=1556
+http://vcs.pcre.org/pcre?view=revision&revision=1557
+
+This patch may be removed when pcre is upgraded from version 8.37
+
+--- pcre-8.37-orig/ChangeLog	2015-04-28 04:37:57.000000000 -0700
++++ pcre-8.37/ChangeLog	2015-06-18 14:04:00.765607692 -0700
+@@ -1,6 +1,29 @@
+ ChangeLog for PCRE
+ ------------------
+ 
++Changes since Version 8.37
++------------------------
++
++1.  If a group that contained a recursive back reference also contained a
++    forward reference subroutine call followed by a non-forward-reference
++    subroutine call, for example /.((?2)(?R)\1)()/, pcre2_compile() failed to
++    compile correct code, leading to undefined behaviour or an internally
++    detected error. This bug was discovered by the LLVM fuzzer.
++    
++2.  Quantification of certain items (e.g. atomic back references) could cause
++    incorrect code to be compiled when recursive forward references were
++    involved. For example, in this pattern: /(?1)()((((((\1++))\x85)+)|))/.
++    This bug was discovered by the LLVM fuzzer.
++    
++3.  A repeated conditional group whose condition was a reference by name caused
++    a buffer overflow if there was more than one group with the given name.
++    This bug was discovered by the LLVM fuzzer.
++    
++4.  A recursive back reference by name within a group that had the same name as
++    another group caused a buffer overflow. For example:
++    /(?J)(?'d'(?'d'\g{d}))/. This bug was discovered by the LLVM fuzzer.
++ 
++
+ Version 8.37 28-April-2015
+ --------------------------
+ 
+--- pcre-8.37-orig/pcre_compile.c	2015-04-13 08:54:01.000000000 -0700
++++ pcre-8.37/pcre_compile.c	2015-06-18 13:50:47.045221926 -0700
+@@ -3985,11 +3985,12 @@ have their offsets adjusted. That one of
+ is called, the partially compiled regex must be temporarily terminated with
+ OP_END.
+ 
+-This function has been extended with the possibility of forward references for
+-recursions and subroutine calls. It must also check the list of such references
+-for the group we are dealing with. If it finds that one of the recursions in
+-the current group is on this list, it adjusts the offset in the list, not the
+-value in the reference (which is a group number).
++This function has been extended to cope with forward references for recursions
++and subroutine calls. It must check the list of such references for the
++group we are dealing with. If it finds that one of the recursions in the
++current group is on this list, it does not adjust the value in the reference
++(which is a group number). After the group has been scanned, all the offsets in
++the forward reference list for the group are adjusted.
+ 
+ Arguments:
+   group      points to the start of the group
+@@ -4005,29 +4006,21 @@ static void
+ adjust_recurse(pcre_uchar *group, int adjust, BOOL utf, compile_data *cd,
+   size_t save_hwm_offset)
+ {
++int offset;
++pcre_uchar *hc;
+ pcre_uchar *ptr = group;
+ 
+ while ((ptr = (pcre_uchar *)find_recurse(ptr, utf)) != NULL)
+   {
+-  int offset;
+-  pcre_uchar *hc;
+-
+-  /* See if this recursion is on the forward reference list. If so, adjust the
+-  reference. */
+-
+   for (hc = (pcre_uchar *)cd->start_workspace + save_hwm_offset; hc < cd->hwm;
+        hc += LINK_SIZE)
+     {
+     offset = (int)GET(hc, 0);
+-    if (cd->start_code + offset == ptr + 1)
+-      {
+-      PUT(hc, 0, offset + adjust);
+-      break;
+-      }
++    if (cd->start_code + offset == ptr + 1) break;
+     }
+ 
+-  /* Otherwise, adjust the recursion offset if it's after the start of this
+-  group. */
++  /* If we have not found this recursion on the forward reference list, adjust
++  the recursion's offset if it's after the start of this group. */
+ 
+   if (hc >= cd->hwm)
+     {
+@@ -4037,6 +4030,15 @@ while ((ptr = (pcre_uchar *)find_recurse
+ 
+   ptr += 1 + LINK_SIZE;
+   }
++
++/* Now adjust all forward reference offsets for the group. */
++
++for (hc = (pcre_uchar *)cd->start_workspace + save_hwm_offset; hc < cd->hwm;
++     hc += LINK_SIZE)
++  {
++  offset = (int)GET(hc, 0);
++  PUT(hc, 0, offset + adjust);
++  }
+ }
+ 
+ 
+@@ -4465,7 +4467,7 @@ const pcre_uchar *tempptr;
+ const pcre_uchar *nestptr = NULL;
+ pcre_uchar *previous = NULL;
+ pcre_uchar *previous_callout = NULL;
+-size_t save_hwm_offset = 0;
++size_t item_hwm_offset = 0;
+ pcre_uint8 classbits[32];
+ 
+ /* We can fish out the UTF-8 setting once and for all into a BOOL, but we
+@@ -4767,6 +4769,7 @@ for (;; ptr++)
+     zeroreqchar = reqchar;
+     zeroreqcharflags = reqcharflags;
+     previous = code;
++    item_hwm_offset = cd->hwm - cd->start_workspace;
+     *code++ = ((options & PCRE_DOTALL) != 0)? OP_ALLANY: OP_ANY;
+     break;
+ 
+@@ -4818,6 +4821,7 @@ for (;; ptr++)
+     /* Handle a real character class. */
+ 
+     previous = code;
++    item_hwm_offset = cd->hwm - cd->start_workspace;
+ 
+     /* PCRE supports POSIX class stuff inside a class. Perl gives an error if
+     they are encountered at the top level, so we'll do that too. */
+@@ -5930,7 +5934,7 @@ for (;; ptr++)
+       {
+       register int i;
+       int len = (int)(code - previous);
+-      size_t base_hwm_offset = save_hwm_offset;
++      size_t base_hwm_offset = item_hwm_offset;
+       pcre_uchar *bralink = NULL;
+       pcre_uchar *brazeroptr = NULL;
+ 
+@@ -5985,7 +5989,7 @@ for (;; ptr++)
+         if (repeat_max <= 1)    /* Covers 0, 1, and unlimited */
+           {
+           *code = OP_END;
+-          adjust_recurse(previous, 1, utf, cd, save_hwm_offset);
++          adjust_recurse(previous, 1, utf, cd, item_hwm_offset);
+           memmove(previous + 1, previous, IN_UCHARS(len));
+           code++;
+           if (repeat_max == 0)
+@@ -6009,7 +6013,7 @@ for (;; ptr++)
+           {
+           int offset;
+           *code = OP_END;
+-          adjust_recurse(previous, 2 + LINK_SIZE, utf, cd, save_hwm_offset);
++          adjust_recurse(previous, 2 + LINK_SIZE, utf, cd, item_hwm_offset);
+           memmove(previous + 2 + LINK_SIZE, previous, IN_UCHARS(len));
+           code += 2 + LINK_SIZE;
+           *previous++ = OP_BRAZERO + repeat_type;
+@@ -6267,7 +6271,7 @@ for (;; ptr++)
+               {
+               int nlen = (int)(code - bracode);
+               *code = OP_END;
+-              adjust_recurse(bracode, 1 + LINK_SIZE, utf, cd, save_hwm_offset);
++              adjust_recurse(bracode, 1 + LINK_SIZE, utf, cd, item_hwm_offset);
+               memmove(bracode + 1 + LINK_SIZE, bracode, IN_UCHARS(nlen));
+               code += 1 + LINK_SIZE;
+               nlen += 1 + LINK_SIZE;
+@@ -6401,7 +6405,7 @@ for (;; ptr++)
+         else
+           {
+           *code = OP_END;
+-          adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cd, save_hwm_offset);
++          adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cd, item_hwm_offset);
+           memmove(tempcode + 1 + LINK_SIZE, tempcode, IN_UCHARS(len));
+           code += 1 + LINK_SIZE;
+           len += 1 + LINK_SIZE;
+@@ -6450,7 +6454,7 @@ for (;; ptr++)
+ 
+         default:
+         *code = OP_END;
+-        adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cd, save_hwm_offset);
++        adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cd, item_hwm_offset);
+         memmove(tempcode + 1 + LINK_SIZE, tempcode, IN_UCHARS(len));
+         code += 1 + LINK_SIZE;
+         len += 1 + LINK_SIZE;
+@@ -6623,7 +6627,7 @@ for (;; ptr++)
+     newoptions = options;
+     skipbytes = 0;
+     bravalue = OP_CBRA;
+-    save_hwm_offset = cd->hwm - cd->start_workspace;
++    item_hwm_offset = cd->hwm - cd->start_workspace;
+     reset_bracount = FALSE;
+ 
+     /* Deal with the extended parentheses; all are introduced by '?', and the
+@@ -6769,7 +6773,7 @@ for (;; ptr++)
+             ptr++;
+             }
+           namelen = (int)(ptr - name);
+-          if (lengthptr != NULL) *lengthptr += IMM2_SIZE;
++          if (lengthptr != NULL) skipbytes += IMM2_SIZE;
+           }
+ 
+         /* Check the terminator */
+@@ -7173,14 +7177,26 @@ for (;; ptr++)
+           number. If the name is not found, set the value to 0 for a forward
+           reference. */
+ 
++          recno = 0;
+           ng = cd->named_groups;
+           for (i = 0; i < cd->names_found; i++, ng++)
+             {
+             if (namelen == ng->length &&
+                 STRNCMP_UC_UC(name, ng->name, namelen) == 0)
+-              break;
++              {
++              open_capitem *oc;
++              recno = ng->number;
++              if (is_recurse) break;
++              for (oc = cd->open_caps; oc != NULL; oc = oc->next)         
++                {          
++                if (oc->number == recno)                                     
++                  {               
++                  oc->flag = TRUE;                                      
++                  break;
++                  }                                                         
++                }                          
++              }    
+             }
+-          recno = (i < cd->names_found)? ng->number : 0;
+ 
+           /* Count named back references. */
+ 
+@@ -7247,6 +7263,7 @@ for (;; ptr++)
+             {
+             if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
+             previous = code;
++            item_hwm_offset = cd->hwm - cd->start_workspace;
+             *code++ = ((options & PCRE_CASELESS) != 0)? OP_DNREFI : OP_DNREF;
+             PUT2INC(code, 0, index);
+             PUT2INC(code, 0, count);
+@@ -7360,6 +7377,7 @@ for (;; ptr++)
+           HANDLE_RECURSION:
+ 
+           previous = code;
++          item_hwm_offset = cd->hwm - cd->start_workspace;
+           called = cd->start_code;
+ 
+           /* When we are actually compiling, find the bracket that is being
+@@ -7561,7 +7579,11 @@ for (;; ptr++)
+       previous = NULL;
+       cd->iscondassert = FALSE;
+       }
+-    else previous = code;
++    else 
++      {
++      previous = code;
++      item_hwm_offset = cd->hwm - cd->start_workspace;
++      }
+ 
+     *code = bravalue;
+     tempcode = code;
+@@ -7809,7 +7831,7 @@ for (;; ptr++)
+         const pcre_uchar *p;
+         pcre_uint32 cf;
+ 
+-        save_hwm_offset = cd->hwm - cd->start_workspace;   /* Normally this is set when '(' is read */
++        item_hwm_offset = cd->hwm - cd->start_workspace;   /* Normally this is set when '(' is read */
+         terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?
+           CHAR_GREATER_THAN_SIGN : CHAR_APOSTROPHE;
+ 
+@@ -7877,6 +7899,7 @@ for (;; ptr++)
+         HANDLE_REFERENCE:
+         if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
+         previous = code;
++        item_hwm_offset = cd->hwm - cd->start_workspace;
+         *code++ = ((options & PCRE_CASELESS) != 0)? OP_REFI : OP_REF;
+         PUT2INC(code, 0, recno);
+         cd->backref_map |= (recno < 32)? (1 << recno) : 1;
+@@ -7906,6 +7929,7 @@ for (;; ptr++)
+         if (!get_ucp(&ptr, &negated, &ptype, &pdata, errorcodeptr))
+           goto FAILED;
+         previous = code;
++        item_hwm_offset = cd->hwm - cd->start_workspace;
+         *code++ = ((escape == ESC_p) != negated)? OP_PROP : OP_NOTPROP;
+         *code++ = ptype;
+         *code++ = pdata;
+@@ -7946,6 +7970,7 @@ for (;; ptr++)
+ 
+           {
+           previous = (escape > ESC_b && escape < ESC_Z)? code : NULL;
++          item_hwm_offset = cd->hwm - cd->start_workspace;
+           *code++ = (!utf && escape == ESC_C)? OP_ALLANY : escape;
+           }
+         }
+@@ -7989,6 +8014,7 @@ for (;; ptr++)
+ 
+     ONE_CHAR:
+     previous = code;
++    item_hwm_offset = cd->hwm - cd->start_workspace;
+ 
+     /* For caseless UTF-8 mode when UCP support is available, check whether
+     this character has more than one other case. If so, generate a special
+--- pcre-8.37-orig/testdata/testinput11	2015-03-02 09:08:42.000000000 -0800
++++ pcre-8.37/testdata/testinput11	2015-06-18 14:07:11.883240591 -0700
+@@ -136,4 +136,6 @@ is required for these tests. --/
+ 
+ /((?+1)(\1))/B
+ 
++/.((?2)(?R)\1)()/B
++
+ /-- End of testinput11 --/
+--- pcre-8.37-orig/testdata/testinput2	2015-04-13 02:36:15.000000000 -0700
++++ pcre-8.37/testdata/testinput2	2015-06-18 14:13:30.706283638 -0700
+@@ -4152,4 +4152,20 @@ backtracking verbs. --/
+ 
+ /((?2){73}(?2))((?1))/
+ 
++/.((?2)(?R)\1)()/BZ
++
++/(?1)()((((((\1++))\x85)+)|))/
++
++/(\9*+(?2);\3++()2|)++{/
++
++/\V\x85\9*+((?2)\3++()2)*:2/
++
++/(((?(R)){0,2}) (?''((?'R')((?'R')))))/J
++
++/(((?(X)){0,2}) (?''((?'X')((?'X')))))/J
++
++/(((?(R)){0,2}) (?''((?'X')((?'R')))))/
++
++"(?J)(?'d'(?'d'\g{d}))"
++
+ /-- End of testinput2 --/
+--- pcre-8.37-orig/testdata/testoutput11-16	2015-03-02 09:09:21.000000000 -0800
++++ pcre-8.37/testdata/testoutput11-16	2015-06-18 14:09:10.358550764 -0700
+@@ -748,4 +748,21 @@ Memory allocation (code space): 14
+  22     End
+ ------------------------------------------------------------------
+ 
++/.((?2)(?R)\1)()/B
++------------------------------------------------------------------
++  0  23 Bra
++  2     Any
++  3  13 Once
++  5   9 CBra 1
++  8  18 Recurse
++ 10   0 Recurse
++ 12     \1
++ 14   9 Ket
++ 16  13 Ket
++ 18   3 CBra 2
++ 21   3 Ket
++ 23  23 Ket
++ 25     End
++------------------------------------------------------------------
++
+ /-- End of testinput11 --/
+--- pcre-8.37-orig/testdata/testoutput11-32	2015-03-02 09:09:30.000000000 -0800
++++ pcre-8.37/testdata/testoutput11-32	2015-06-18 14:10:09.893600910 -0700
+@@ -748,4 +748,21 @@ Memory allocation (code space): 28
+  22     End
+ ------------------------------------------------------------------
+ 
++/.((?2)(?R)\1)()/B
++------------------------------------------------------------------
++  0  23 Bra
++  2     Any
++  3  13 Once
++  5   9 CBra 1
++  8  18 Recurse
++ 10   0 Recurse
++ 12     \1
++ 14   9 Ket
++ 16  13 Ket
++ 18   3 CBra 2
++ 21   3 Ket
++ 23  23 Ket
++ 25     End
++------------------------------------------------------------------
++
+ /-- End of testinput11 --/
+--- pcre-8.37-orig/testdata/testoutput11-8	2015-03-02 09:09:13.000000000 -0800
++++ pcre-8.37/testdata/testoutput11-8	2015-06-18 14:11:19.765400848 -0700
+@@ -748,4 +748,21 @@ Memory allocation (code space): 10
+  34     End
+ ------------------------------------------------------------------
+ 
++/.((?2)(?R)\1)()/B
++------------------------------------------------------------------
++  0  35 Bra
++  3     Any
++  4  20 Once
++  7  14 CBra 1
++ 12  27 Recurse
++ 15   0 Recurse
++ 18     \1
++ 21  14 Ket
++ 24  20 Ket
++ 27   5 CBra 2
++ 32   5 Ket
++ 35  35 Ket
++ 38     End
++------------------------------------------------------------------
++
+ /-- End of testinput11 --/
+--- pcre-8.37-orig/testdata/testoutput2	2015-04-13 02:36:27.000000000 -0700
++++ pcre-8.37/testdata/testoutput2	2015-06-18 14:15:05.747984099 -0700
+@@ -14423,4 +14423,37 @@ Failed: lookbehind assertion is not fixe
+ 
+ /((?2){73}(?2))((?1))/
+ 
++/.((?2)(?R)\1)()/BZ
++------------------------------------------------------------------
++        Bra
++        Any
++        Once
++        CBra 1
++        Recurse
++        Recurse
++        \1
++        Ket
++        Ket
++        CBra 2
++        Ket
++        Ket
++        End
++------------------------------------------------------------------
++
++/(?1)()((((((\1++))\x85)+)|))/
++
++/(\9*+(?2);\3++()2|)++{/
++Failed: reference to non-existent subpattern at offset 22
++
++/\V\x85\9*+((?2)\3++()2)*:2/
++Failed: reference to non-existent subpattern at offset 26
++
++/(((?(R)){0,2}) (?''((?'R')((?'R')))))/J
++
++/(((?(X)){0,2}) (?''((?'X')((?'X')))))/J
++
++/(((?(R)){0,2}) (?''((?'X')((?'R')))))/
++
++"(?J)(?'d'(?'d'\g{d}))"
++
+ /-- End of testinput2 --/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pcre/patches/05-CVE-2015-3217.patch	Fri Jul 10 08:56:04 2015 -0700
@@ -0,0 +1,65 @@
+Patch from upstream:
+http://vcs.pcre.org/pcre?view=revision&revision=1566
+to fix CVE-2015-3217 for this upstream bug
+https://bugs.exim.org/show_bug.cgi?id=1638
+
+This patch may be removed when pcre is upgraded from version 8.37
+
+--- pcre-8.37-orig/ChangeLog	2015-06-18 14:42:05.162869794 -0700
++++ pcre-8.37/ChangeLog	2015-06-18 14:42:49.750142570 -0700
+@@ -23,6 +23,10 @@ Changes since Version 8.37
+     another group caused a buffer overflow. For example:
+     /(?J)(?'d'(?'d'\g{d}))/. This bug was discovered by the LLVM fuzzer.
+  
++5.  If a non-capturing group containing a conditional group that could match
++    an empty string was repeated, it was not identified as matching an empty
++    string itself. For example: /^(?:(?(1)x|)+)+$()/.
++
+ 
+ Version 8.37 28-April-2015
+ --------------------------
+--- pcre-8.37-orig/pcre_compile.c	2015-06-18 14:43:18.613383953 -0700
++++ pcre-8.37/pcre_compile.c	2015-06-18 14:44:14.866515479 -0700
+@@ -2487,7 +2487,7 @@ for (code = first_significant_code(code 
+   if (c == OP_BRA  || c == OP_BRAPOS ||
+       c == OP_CBRA || c == OP_CBRAPOS ||
+       c == OP_ONCE || c == OP_ONCE_NC ||
+-      c == OP_COND)
++      c == OP_COND || c == OP_SCOND)
+     {
+     BOOL empty_branch;
+     if (GET(code, 1) == 0) return TRUE;    /* Hit unclosed bracket */
+--- pcre-8.37-orig/testdata/testinput2	2015-06-18 14:45:30.453719449 -0700
++++ pcre-8.37/testdata/testinput2	2015-06-18 14:46:14.175672070 -0700
+@@ -4168,4 +4168,6 @@ backtracking verbs. --/
+ 
+ "(?J)(?'d'(?'d'\g{d}))"
+ 
++/^(?:(?(1)x|)+)+$()/BZ
++
+ /-- End of testinput2 --/
+--- pcre-8.37-orig/testdata/testoutput2	2015-06-18 14:45:38.047882931 -0700
++++ pcre-8.37/testdata/testoutput2	2015-06-18 14:47:02.815368178 -0700
+@@ -14456,4 +14456,22 @@ Failed: reference to non-existent subpat
+ 
+ "(?J)(?'d'(?'d'\g{d}))"
+ 
++/^(?:(?(1)x|)+)+$()/BZ
++------------------------------------------------------------------
++        Bra
++        ^
++        SBra
++        SCond
++      1 Cond ref
++        x
++        Alt
++        KetRmax
++        KetRmax
++        $
++        CBra 1
++        Ket
++        Ket
++        End
++------------------------------------------------------------------
++
+ /-- End of testinput2 --/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pcre/patches/06-CVE-2015-5073.patch	Fri Jul 10 08:56:04 2015 -0700
@@ -0,0 +1,50 @@
+Patch from upstream:
+http://vcs.pcre.org/pcre?view=revision&revision=1571
+to fix CVE-2015-5073 for this upstream bug
+https://bugs.exim.org/show_bug.cgi?id=1651
+
+This patch may be removed when pcre is upgraded from version 8.37
+
+--- pcre-8.37-orig/ChangeLog	2015-06-29 09:12:15.694261234 -0700
++++ pcre-8.37/ChangeLog	2015-06-29 09:29:45.739958088 -0700
+@@ -27,6 +27,10 @@ Changes since Version 8.37
+     an empty string was repeated, it was not identified as matching an empty
+     string itself. For example: /^(?:(?(1)x|)+)+$()/.
+ 
++6.  A pattern with an unmatched closing parenthesis that contained a backward 
++    assertion which itself contained a forward reference caused buffer 
++    overflow. And example pattern is: /(?=di(?<=(?1))|(?=(.))))/.
++
+ 
+ Version 8.37 28-April-2015
+ --------------------------
+--- pcre-8.37-orig/pcre_compile.c	2015-06-29 09:12:15.695805136 -0700
++++ pcre-8.37/pcre_compile.c	2015-06-29 09:17:13.527304409 -0700
+@@ -9406,7 +9406,7 @@ OP_RECURSE that are not fixed length get
+ exceptional ones forgo this. We scan the pattern to check that they are fixed
+ length, and set their lengths. */
+ 
+-if (cd->check_lookbehind)
++if (errorcode == 0 && cd->check_lookbehind)
+   {
+   pcre_uchar *cc = (pcre_uchar *)codestart;
+ 
+--- pcre-8.37-orig/testdata/testinput2	2015-06-29 09:12:15.696414562 -0700
++++ pcre-8.37/testdata/testinput2	2015-06-29 09:24:55.146760633 -0700
+@@ -4170,4 +4170,6 @@ backtracking verbs. --/
+ 
+ /^(?:(?(1)x|)+)+$()/BZ
+ 
++/(?=di(?<=(?1))|(?=(.))))/
++
+ /-- End of testinput2 --/
+--- pcre-8.37-orig/testdata/testoutput2	2015-06-29 09:12:15.698016242 -0700
++++ pcre-8.37/testdata/testoutput2	2015-06-29 09:26:11.171270088 -0700
+@@ -14474,4 +14474,7 @@ Failed: reference to non-existent subpat
+         End
+ ------------------------------------------------------------------
+ 
++/(?=di(?<=(?1))|(?=(.))))/
++Failed: unmatched parentheses at offset 23
++
+ /-- End of testinput2 --/
--- a/components/pcre/patches/Makefile.in.patch	Tue Jun 23 14:24:18 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
---- pcre-8.21.orig/Makefile.in	Thu Nov  3 15:31:39 2011
-+++ pcre-8.21/Makefile.in	Thu Nov  3 15:33:57 2011
-@@ -275,9 +275,9 @@
- ECHO_T = @ECHO_T@
- EGREP = @EGREP@
- EXEEXT = @EXEEXT@
--EXTRA_LIBPCRECPP_LDFLAGS = @EXTRA_LIBPCRECPP_LDFLAGS@
--EXTRA_LIBPCREPOSIX_LDFLAGS = @EXTRA_LIBPCREPOSIX_LDFLAGS@
--EXTRA_LIBPCRE_LDFLAGS = @EXTRA_LIBPCRE_LDFLAGS@
-+EXTRA_LIBPCRECPP_LDFLAGS = @CXXFLAGS@ @LDFLAGS@
-+EXTRA_LIBPCREPOSIX_LDFLAGS = @LDFLAGS@
-+EXTRA_LIBPCRE_LDFLAGS = @LDFLAGS@
- FGREP = @FGREP@
- GREP = @GREP@
- INSTALL = @INSTALL@
--- a/components/pcre/patches/doc.patch	Tue Jun 23 14:24:18 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-diff -ru pcre-8.21.orig/doc/pcrejit.3 pcre-8.21/doc/pcrejit.3
---- pcre-8.21.orig/doc/pcrejit.3	Mon Dec  5 04:35:39 2011
-+++ pcre-8.21/doc/pcrejit.3	Mon Dec 19 14:20:39 2011
-@@ -33,6 +33,8 @@
- The Power PC support is designated as experimental because it has not been
- fully tested. If --enable-jit is set on an unsupported platform, compilation
- fails.
-+.sp
-+JIT support is not available on Solaris.
- .P
- A program that is linked with PCRE 8.20 or later can tell if JIT support is
- available by calling \fBpcre_config()\fP with the PCRE_CONFIG_JIT option. The
-diff -ru pcre-8.21.orig/doc/html/pcrejit.html pcre-8.21/doc/html/pcrejit.html
---- pcre-8.21.orig/doc/html/pcrejit.html	Mon Dec 12 04:08:23 2011
-+++ pcre-8.21/doc/html/pcrejit.html	Mon Dec 19 14:31:58 2011
-@@ -58,6 +58,9 @@
- fails.
- </P>
- <P>
-+JIT support is not available on Solaris.
-+</P>
-+<P>
- A program that is linked with PCRE 8.20 or later can tell if JIT support is
- available by calling <b>pcre_config()</b> with the PCRE_CONFIG_JIT option. The
- result is 1 when JIT is available, and 0 otherwise. However, a simple program
--- a/components/pcre/patches/pcre_compile.patch	Tue Jun 23 14:24:18 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-diff -ru pcre-8.21.orig//pcre_compile.c pcre-8.21/pcre_compile.c
---- pcre-8.21.orig//pcre_compile.c	Wed Dec  7 08:45:36 2011
-+++ pcre-8.21/pcre_compile.c	Mon Mar 19 15:11:42 2012
-@@ -1655,7 +1655,8 @@
-     case OP_ASSERTBACK:
-     case OP_ASSERTBACK_NOT:
-     do cc += GET(cc, 1); while (*cc == OP_ALT);
--    /* Fall through */
-+    cc += _pcre_OP_lengths[*cc];
-+    break;
- 
-     /* Skip over things that don't match chars */
- 
--- a/components/pcre/pcre.license	Tue Jun 23 14:24:18 2015 -0700
+++ b/components/pcre/pcre.license	Fri Jul 10 08:56:04 2015 -0700
@@ -1,94 +1,95 @@
-PCRE LICENCE 
------------- 
+PCRE LICENCE
+------------
 
-PCRE is a library of functions to support regular expressions whose syntax 
-and semantics are as close as possible to those of the Perl 5 language. 
+PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
 
-Release 8 of PCRE is distributed under the terms of the "BSD" licence, as 
-specified below. The documentation for PCRE, supplied in the "doc" 
-directory, is distributed under the same terms as the software itself. 
+Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
+specified below. The documentation for PCRE, supplied in the "doc"
+directory, is distributed under the same terms as the software itself.
 
-The basic library functions are written in C and are freestanding. Also 
-included in the distribution is a set of C++ wrapper functions, and a 
-just-in-time compiler that can be used to optimize pattern matching. These 
-are both optional features that can be omitted when the library is built. 
+The basic library functions are written in C and are freestanding. Also
+included in the distribution is a set of C++ wrapper functions, and a
+just-in-time compiler that can be used to optimize pattern matching. These
+are both optional features that can be omitted when the library is built.
 
 
-THE BASIC LIBRARY FUNCTIONS 
---------------------------- 
+THE BASIC LIBRARY FUNCTIONS
+---------------------------
 
-Written by:       Philip Hazel 
-Email local part: ph10 
-Email domain:     cam.ac.uk 
+Written by:       Philip Hazel
+Email local part: ph10
+Email domain:     cam.ac.uk
 
-University of Cambridge Computing Service, 
-Cambridge, England. 
+University of Cambridge Computing Service,
+Cambridge, England.
 
-Copyright (c) 1997-2011 University of Cambridge 
-All rights reserved. 
+Copyright (c) 1997-2015 University of Cambridge
+All rights reserved.
 
 
-PCRE JUST-IN-TIME COMPILATION SUPPORT 
-------------------------------------- 
+PCRE JUST-IN-TIME COMPILATION SUPPORT
+-------------------------------------
 
-Written by:       Zoltan Herczeg 
-Email local part: hzmester 
-Emain domain:     freemail.hu 
+Written by:       Zoltan Herczeg
+Email local part: hzmester
+Emain domain:     freemail.hu
 
-Copyright(c) 2010-2011 Zoltan Herczeg 
-All rights reserved. 
+Copyright(c) 2010-2015 Zoltan Herczeg
+All rights reserved.
 
 
-STACK-LESS JUST-IN-TIME COMPILER 
--------------------------------- 
+STACK-LESS JUST-IN-TIME COMPILER
+--------------------------------
 
-Written by:       Zoltan Herczeg 
-Email local part: hzmester 
-Emain domain:     freemail.hu 
+Written by:       Zoltan Herczeg
+Email local part: hzmester
+Emain domain:     freemail.hu
 
-Copyright(c) 2009-2011 Zoltan Herczeg 
-All rights reserved. 
+Copyright(c) 2009-2015 Zoltan Herczeg
+All rights reserved.
 
 
-THE C++ WRAPPER FUNCTIONS 
-------------------------- 
+THE C++ WRAPPER FUNCTIONS
+-------------------------
 
-Contributed by:   Google Inc. 
+Contributed by:   Google Inc.
 
-Copyright (c) 2007-2011, Google Inc. 
-All rights reserved. 
+Copyright (c) 2007-2012, Google Inc.
+All rights reserved.
 
 
-THE "BSD" LICENCE 
------------------ 
+THE "BSD" LICENCE
+-----------------
 
-Redistribution and use in source and binary forms, with or without 
-modification, are permitted provided that the following conditions are met: 
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
 
-    * Redistributions of source code must retain the above copyright notice, 
-      this list of conditions and the following disclaimer. 
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
 
-    * Redistributions in binary form must reproduce the above copyright 
-      notice, this list of conditions and the following disclaimer in the 
-      documentation and/or other materials provided with the distribution. 
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
 
-    * Neither the name of the University of Cambridge nor the name of Google 
-      Inc. nor the names of their contributors may be used to endorse or 
-      promote products derived from this software without specific prior 
-      written permission. 
- 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
-POSSIBILITY OF SUCH DAMAGE. 
+    * Neither the name of the University of Cambridge nor the name of Google
+      Inc. nor the names of their contributors may be used to endorse or
+      promote products derived from this software without specific prior
+      written permission.
 
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+End
 
 ADDITIONAL COPYRIGHT NOTICES PRESENT IN SOURCE CODE FILES:
 
@@ -102,7 +103,10 @@
 and semantics are as close as possible to those of the Perl 5 language.
 
                        Written by Philip Hazel
-           Copyright (c) 1997-2011 University of Cambridge
+           Copyright (c) 1997-2014 University of Cambridge
+
+Copyright (c) 2005, Google Inc.
+All rights reserved.
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -133,40 +137,39 @@
 -----------------------------------------------------------------------------
 */
 
-
 2. GOOGLE Copyright Header:
 
 
-// Copyright (c) 2005 - 2010, Google Inc. 
-// All rights reserved. 
-// 
-// Redistribution and use in source and binary forms, with or without 
-// modification, are permitted provided that the following conditions are 
-// met: 
-// 
-//     * Redistributions of source code must retain the above copyright 
-// notice, this list of conditions and the following disclaimer. 
-//     * Redistributions in binary form must reproduce the above 
-// copyright notice, this list of conditions and the following disclaimer 
-// in the documentation and/or other materials provided with the 
-// distribution. 
-//     * Neither the name of Google Inc. nor the names of its 
-// contributors may be used to endorse or promote products derived from 
-// this software without specific prior written permission. 
-// 
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
-// 
-// Author: Sanjay Ghemawat 
+// Copyright (c) 2005 - 2010, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: Sanjay Ghemawat
 // Author: Greg J. Badros
 // Author: [email protected] (Wilson Hsieh)
 
@@ -174,30 +177,28 @@
 3. Stack-less Just-In-Time Compiler Copyright Header:
 
 
- *    Stack-less Just-In-Time compiler 
- * 
- *    Copyright 2009-2010 Zoltan Herczeg ([email protected]). All rights reserved. 
- * 
- * Redistribution and use in source and binary forms, with or without modification, are 
- * permitted provided that the following conditions are met: 
- * 
- *   1. Redistributions of source code must retain the above copyright notice, this list of 
- *      conditions and the following disclaimer. 
- * 
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list 
- *      of conditions and the following disclaimer in the documentation and/or other materials 
- *      provided with the distribution. 
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY 
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ *    Stack-less Just-In-Time compiler
+ *
+ *    Copyright 2013-2013 Tilera Corporation([email protected]). All rights reserved.
+ *    Copyright 2009-2012 Zoltan Herczeg ([email protected]). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ *   1. Redistributions of source code must retain the above copyright notice, this list of
+ *      conditions and the following disclaimer.
+ *
+ *   2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *      of conditions and the following disclaimer in the documentation and/or other materials
+ *      provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-
-
-
--- a/components/pcre/pcre.p5m	Tue Jun 23 14:24:18 2015 -0700
+++ b/components/pcre/pcre.p5m	Fri Jul 10 08:56:04 2015 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
@@ -27,7 +27,7 @@
 set name=pkg.summary value="Perl-Compatible Regular Expressions"
 set name=pkg.description value="The PCRE library is a set of functions that implement regular expression pattern matching using almost the same syntax and semantics as Perl"
 set name=com.oracle.info.description value="the PCRE library"
-set name=com.oracle.info.tpno value=9271
+set name=com.oracle.info.tpno value=23018
 set name=info.classification value="org.opensolaris.category.2008:Development/C"
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
@@ -35,26 +35,9 @@
 set name=org.opensolaris.arc-caseid \
     value=PSARC/2012/081
 
-dir path=usr
-dir path=usr/bin
-dir path=usr/bin/$(MACH64)
-dir path=usr/include
-dir path=usr/include/pcre
-dir path=usr/lib
-dir path=usr/lib/$(MACH64)
-dir path=usr/lib/$(MACH64)/pkgconfig
-dir path=usr/lib/pkgconfig
-dir path=usr/share
-dir path=usr/share/doc
-dir path=usr/share/doc/pcre
-dir path=usr/share/doc/pcre/html
-dir path=usr/share/man
-dir path=usr/share/man/man1
-dir path=usr/share/man/man3
-
+file path=usr/bin/$(MACH64)/pcre-config
 file path=usr/bin/$(MACH64)/pcregrep
 file path=usr/bin/$(MACH64)/pcretest
-file path=usr/bin/$(MACH64)/pcre-config
 file path=usr/bin/pcre-config
 file path=usr/bin/pcregrep
 file path=usr/bin/pcretest
@@ -66,24 +49,40 @@
 file path=usr/include/pcre/pcrecpparg.h
 file path=usr/include/pcre/pcreposix.h
 file ucp.h path=usr/include/pcre/ucp.h
+link path=usr/lib/$(MACH64)/libpcre.so target=libpcre.so.0.0.0
+link path=usr/lib/$(MACH64)/libpcre.so.0 target=libpcre.so.0.0.0
 file path=usr/lib/$(MACH64)/libpcre.so.0.0.0
+link path=usr/lib/$(MACH64)/libpcrecpp.so target=libpcrecpp.so.0.0.0
+link path=usr/lib/$(MACH64)/libpcrecpp.so.0 target=libpcrecpp.so.0.0.0
 file path=usr/lib/$(MACH64)/libpcrecpp.so.0.0.0
+link path=usr/lib/$(MACH64)/libpcreposix.so target=libpcreposix.so.0.0.0
+link path=usr/lib/$(MACH64)/libpcreposix.so.0 target=libpcreposix.so.0.0.0
 file path=usr/lib/$(MACH64)/libpcreposix.so.0.0.0
 file path=usr/lib/$(MACH64)/llib-lpcre.ln
 file path=usr/lib/$(MACH64)/pkgconfig/libpcre.pc
 file path=usr/lib/$(MACH64)/pkgconfig/libpcrecpp.pc
 file path=usr/lib/$(MACH64)/pkgconfig/libpcreposix.pc
+link path=usr/lib/libpcre.so target=libpcre.so.0.0.0
+link path=usr/lib/libpcre.so.0 target=libpcre.so.0.0.0
 file path=usr/lib/libpcre.so.0.0.0
+link path=usr/lib/libpcrecpp.so target=libpcrecpp.so.0.0.0
+link path=usr/lib/libpcrecpp.so.0 target=libpcrecpp.so.0.0.0
 file path=usr/lib/libpcrecpp.so.0.0.0
+link path=usr/lib/libpcreposix.so target=libpcreposix.so.0.0.0
+link path=usr/lib/libpcreposix.so.0 target=libpcreposix.so.0.0.0
 file path=usr/lib/libpcreposix.so.0.0.0
 file llib-lpcre path=usr/lib/llib-lpcre
 file path=usr/lib/llib-lpcre.ln
 file path=usr/lib/pkgconfig/libpcre.pc
 file path=usr/lib/pkgconfig/libpcrecpp.pc
 file path=usr/lib/pkgconfig/libpcreposix.pc
+file path=usr/share/doc/pcre/html/NON-AUTOTOOLS-BUILD.txt
+file path=usr/share/doc/pcre/html/README.txt
 file path=usr/share/doc/pcre/html/index.html
 file path=usr/share/doc/pcre/html/pcre-config.html
 file path=usr/share/doc/pcre/html/pcre.html
+file path=usr/share/doc/pcre/html/pcre16.html
+file path=usr/share/doc/pcre/html/pcre32.html
 file path=usr/share/doc/pcre/html/pcre_assign_jit_stack.html
 file path=usr/share/doc/pcre/html/pcre_compile.html
 file path=usr/share/doc/pcre/html/pcre_compile2.html
@@ -101,12 +100,15 @@
 file path=usr/share/doc/pcre/html/pcre_get_stringtable_entries.html
 file path=usr/share/doc/pcre/html/pcre_get_substring.html
 file path=usr/share/doc/pcre/html/pcre_get_substring_list.html
-file path=usr/share/doc/pcre/html/pcre_info.html
+file path=usr/share/doc/pcre/html/pcre_jit_exec.html
 file path=usr/share/doc/pcre/html/pcre_jit_stack_alloc.html
 file path=usr/share/doc/pcre/html/pcre_jit_stack_free.html
 file path=usr/share/doc/pcre/html/pcre_maketables.html
+file path=usr/share/doc/pcre/html/pcre_pattern_to_host_byte_order.html
 file path=usr/share/doc/pcre/html/pcre_refcount.html
 file path=usr/share/doc/pcre/html/pcre_study.html
+file path=usr/share/doc/pcre/html/pcre_utf16_to_host_byte_order.html
+file path=usr/share/doc/pcre/html/pcre_utf32_to_host_byte_order.html
 file path=usr/share/doc/pcre/html/pcre_version.html
 file path=usr/share/doc/pcre/html/pcreapi.html
 file path=usr/share/doc/pcre/html/pcrebuild.html
@@ -131,6 +133,86 @@
 file path=usr/share/man/man1/pcregrep.1
 file path=usr/share/man/man1/pcretest.1
 file path=usr/share/man/man3/pcre.3
+file path=usr/share/man/man3/pcre16.3
+link path=usr/share/man/man3/pcre16_assign_jit_stack.3 \
+    target=pcre_assign_jit_stack.3
+link path=usr/share/man/man3/pcre16_compile.3 target=pcre_compile.3
+link path=usr/share/man/man3/pcre16_compile2.3 target=pcre_compile2.3
+link path=usr/share/man/man3/pcre16_config.3 target=pcre_config.3
+link path=usr/share/man/man3/pcre16_copy_named_substring.3 \
+    target=pcre_copy_named_substring.3
+link path=usr/share/man/man3/pcre16_copy_substring.3 \
+    target=pcre_copy_substring.3
+link path=usr/share/man/man3/pcre16_dfa_exec.3 target=pcre_dfa_exec.3
+link path=usr/share/man/man3/pcre16_exec.3 target=pcre_exec.3
+link path=usr/share/man/man3/pcre16_free_study.3 target=pcre_free_study.3
+link path=usr/share/man/man3/pcre16_free_substring.3 \
+    target=pcre_free_substring.3
+link path=usr/share/man/man3/pcre16_free_substring_list.3 \
+    target=pcre_free_substring_list.3
+link path=usr/share/man/man3/pcre16_fullinfo.3 target=pcre_fullinfo.3
+link path=usr/share/man/man3/pcre16_get_named_substring.3 \
+    target=pcre_get_named_substring.3
+link path=usr/share/man/man3/pcre16_get_stringnumber.3 \
+    target=pcre_get_stringnumber.3
+link path=usr/share/man/man3/pcre16_get_stringtable_entries.3 \
+    target=pcre_get_stringtable_entries.3
+link path=usr/share/man/man3/pcre16_get_substring.3 target=pcre_get_substring.3
+link path=usr/share/man/man3/pcre16_get_substring_list.3 \
+    target=pcre_get_substring_list.3
+link path=usr/share/man/man3/pcre16_jit_exec.3 target=pcre_jit_exec.3
+link path=usr/share/man/man3/pcre16_jit_stack_alloc.3 \
+    target=pcre_jit_stack_alloc.3
+link path=usr/share/man/man3/pcre16_jit_stack_free.3 \
+    target=pcre_jit_stack_free.3
+link path=usr/share/man/man3/pcre16_maketables.3 target=pcre_maketables.3
+link path=usr/share/man/man3/pcre16_pattern_to_host_byte_order.3 \
+    target=pcre_pattern_to_host_byte_order.3
+link path=usr/share/man/man3/pcre16_refcount.3 target=pcre_refcount.3
+link path=usr/share/man/man3/pcre16_study.3 target=pcre_study.3
+link path=usr/share/man/man3/pcre16_utf16_to_host_byte_order.3 \
+    target=pcre_utf16_to_host_byte_order.3
+link path=usr/share/man/man3/pcre16_version.3 target=pcre_version.3
+file path=usr/share/man/man3/pcre32.3
+link path=usr/share/man/man3/pcre32_assign_jit_stack.3 \
+    target=pcre_assign_jit_stack.3
+link path=usr/share/man/man3/pcre32_compile.3 target=pcre_compile.3
+link path=usr/share/man/man3/pcre32_compile2.3 target=pcre_compile2.3
+link path=usr/share/man/man3/pcre32_config.3 target=pcre_config.3
+link path=usr/share/man/man3/pcre32_copy_named_substring.3 \
+    target=pcre_copy_named_substring.3
+link path=usr/share/man/man3/pcre32_copy_substring.3 \
+    target=pcre_copy_substring.3
+link path=usr/share/man/man3/pcre32_dfa_exec.3 target=pcre_dfa_exec.3
+link path=usr/share/man/man3/pcre32_exec.3 target=pcre_exec.3
+link path=usr/share/man/man3/pcre32_free_study.3 target=pcre_free_study.3
+link path=usr/share/man/man3/pcre32_free_substring.3 \
+    target=pcre_free_substring.3
+link path=usr/share/man/man3/pcre32_free_substring_list.3 \
+    target=pcre_free_substring_list.3
+link path=usr/share/man/man3/pcre32_fullinfo.3 target=pcre_fullinfo.3
+link path=usr/share/man/man3/pcre32_get_named_substring.3 \
+    target=pcre_get_named_substring.3
+link path=usr/share/man/man3/pcre32_get_stringnumber.3 \
+    target=pcre_get_stringnumber.3
+link path=usr/share/man/man3/pcre32_get_stringtable_entries.3 \
+    target=pcre_get_stringtable_entries.3
+link path=usr/share/man/man3/pcre32_get_substring.3 target=pcre_get_substring.3
+link path=usr/share/man/man3/pcre32_get_substring_list.3 \
+    target=pcre_get_substring_list.3
+link path=usr/share/man/man3/pcre32_jit_exec.3 target=pcre_jit_exec.3
+link path=usr/share/man/man3/pcre32_jit_stack_alloc.3 \
+    target=pcre_jit_stack_alloc.3
+link path=usr/share/man/man3/pcre32_jit_stack_free.3 \
+    target=pcre_jit_stack_free.3
+link path=usr/share/man/man3/pcre32_maketables.3 target=pcre_maketables.3
+link path=usr/share/man/man3/pcre32_pattern_to_host_byte_order.3 \
+    target=pcre_pattern_to_host_byte_order.3
+link path=usr/share/man/man3/pcre32_refcount.3 target=pcre_refcount.3
+link path=usr/share/man/man3/pcre32_study.3 target=pcre_study.3
+link path=usr/share/man/man3/pcre32_utf32_to_host_byte_order.3 \
+    target=pcre_utf32_to_host_byte_order.3
+link path=usr/share/man/man3/pcre32_version.3 target=pcre_version.3
 file path=usr/share/man/man3/pcre_assign_jit_stack.3
 file path=usr/share/man/man3/pcre_compile.3
 file path=usr/share/man/man3/pcre_compile2.3
@@ -148,18 +230,22 @@
 file path=usr/share/man/man3/pcre_get_stringtable_entries.3
 file path=usr/share/man/man3/pcre_get_substring.3
 file path=usr/share/man/man3/pcre_get_substring_list.3
-file path=usr/share/man/man3/pcre_info.3
+file path=usr/share/man/man3/pcre_jit_exec.3
 file path=usr/share/man/man3/pcre_jit_stack_alloc.3
 file path=usr/share/man/man3/pcre_jit_stack_free.3
 file path=usr/share/man/man3/pcre_maketables.3
+file path=usr/share/man/man3/pcre_pattern_to_host_byte_order.3
 file path=usr/share/man/man3/pcre_refcount.3
 file path=usr/share/man/man3/pcre_study.3
+file path=usr/share/man/man3/pcre_utf16_to_host_byte_order.3
+file path=usr/share/man/man3/pcre_utf32_to_host_byte_order.3
 file path=usr/share/man/man3/pcre_version.3
 file path=usr/share/man/man3/pcreapi.3
 file path=usr/share/man/man3/pcrebuild.3
 file path=usr/share/man/man3/pcrecallout.3
 file path=usr/share/man/man3/pcrecompat.3
 file path=usr/share/man/man3/pcrecpp.3
+file path=usr/share/man/man3/pcredemo.3
 file path=usr/share/man/man3/pcrejit.3
 file path=usr/share/man/man3/pcrelimits.3
 file path=usr/share/man/man3/pcrematching.3
@@ -172,18 +258,4 @@
 file path=usr/share/man/man3/pcrestack.3
 file path=usr/share/man/man3/pcresyntax.3
 file path=usr/share/man/man3/pcreunicode.3
-
-link path=usr/lib/$(MACH64)/libpcre.so target=libpcre.so.0.0.0
-link path=usr/lib/$(MACH64)/libpcre.so.0 target=libpcre.so.0.0.0
-link path=usr/lib/$(MACH64)/libpcrecpp.so target=libpcrecpp.so.0.0.0
-link path=usr/lib/$(MACH64)/libpcrecpp.so.0 target=libpcrecpp.so.0.0.0
-link path=usr/lib/$(MACH64)/libpcreposix.so target=libpcreposix.so.0.0.0
-link path=usr/lib/$(MACH64)/libpcreposix.so.0 target=libpcreposix.so.0.0.0
-link path=usr/lib/libpcre.so target=libpcre.so.0.0.0
-link path=usr/lib/libpcre.so.0 target=libpcre.so.0.0.0
-link path=usr/lib/libpcrecpp.so target=libpcrecpp.so.0.0.0
-link path=usr/lib/libpcrecpp.so.0 target=libpcrecpp.so.0.0.0
-link path=usr/lib/libpcreposix.so target=libpcreposix.so.0.0.0
-link path=usr/lib/libpcreposix.so.0 target=libpcreposix.so.0.0.0
-
 license pcre.license license="BSD"