From 0c68f1730fdaf9bfc1220ad149830637efd7ac3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 3 Jun 2016 10:35:41 +0200 Subject: [PATCH] Fix an ovector check in JIT test program --- pcre2-10.21-Fix-typo-in-test-program.patch | 34 ++++++++++++++++++++++ pcre2.spec | 4 +++ 2 files changed, 38 insertions(+) create mode 100644 pcre2-10.21-Fix-typo-in-test-program.patch diff --git a/pcre2-10.21-Fix-typo-in-test-program.patch b/pcre2-10.21-Fix-typo-in-test-program.patch new file mode 100644 index 0000000..a9f9baf --- /dev/null +++ b/pcre2-10.21-Fix-typo-in-test-program.patch @@ -0,0 +1,34 @@ +From f4778a47d6d454b71d227d359e874757b7ad1819 Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Wed, 25 May 2016 08:42:31 +0000 +Subject: [PATCH] Fix typo in test program. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@518 6239d852-aaf2-0410-a92c-79f79f948069 + +Petr Písař: Ported to 10.21. + +diff --git a/src/pcre2_jit_test.c b/src/pcre2_jit_test.c +index aaff07d..dfe0032 100644 +--- a/src/pcre2_jit_test.c ++++ b/src/pcre2_jit_test.c +@@ -1532,10 +1532,10 @@ static int regression_tests(void) + is_successful = 0; + } + #endif +-#if defined SUPPORT_PCRE2_16 && defined SUPPORT_PCRE2_16 +- if (ovector16_1[i] != ovector16_2[i] || ovector16_1[i] != ovector16_1[i] || ovector16_1[i] != ovector16_2[i]) { +- printf("\n16 and 16 bit: Ovector[%d] value differs(J16:%d,I16:%d,J32:%d,I32:%d): [%d] '%s' @ '%s' \n", +- i, ovector16_1[i], ovector16_2[i], ovector16_1[i], ovector16_2[i], ++#if defined SUPPORT_PCRE2_16 && defined SUPPORT_PCRE2_32 ++ if (ovector16_1[i] != ovector16_2[i] || ovector16_1[i] != ovector32_1[i] || ovector16_1[i] != ovector32_2[i]) { ++ printf("\n16 and 32 bit: Ovector[%d] value differs(J16:%d,I16:%d,J32:%d,I32:%d): [%d] '%s' @ '%s' \n", ++ i, ovector16_1[i], ovector16_2[i], ovector32_1[i], ovector32_2[i], + total, current->pattern, current->input); + is_successful = 0; + } +-- +2.5.5 + diff --git a/pcre2.spec b/pcre2.spec index 67ff0c3..cc25016 100644 --- a/pcre2.spec +++ b/pcre2.spec @@ -32,6 +32,8 @@ Patch3: pcre2-10.21-Fix-workspace-overflow-for-deep-nested-parentheses-w.pat Patch4: pcre2-10.21-Fix-typo-in-pcre2_study.patch # Fix a race in JIT locking condition, fixed in upstream after 10.21 Patch5: pcre2-10.21-A-racing-condition-is-fixed-in-JIT-reported-by-Mozil.patch +# Fix an ovector check in JIT test program, fixed in upstream after 10.21 +Patch6: pcre2-10.21-Fix-typo-in-test-program.patch # New libtool to get rid of RPATH and to use distribution autotools BuildRequires: autoconf @@ -115,6 +117,7 @@ Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 # Because of multilib patch libtoolize --copy --force autoreconf -vif @@ -212,6 +215,7 @@ make %{?_smp_mflags} check VERBOSE=yes %changelog * Fri Jun 03 2016 Petr Pisar - 10.21-5 - Fix a race in JIT locking condition +- Fix an ovector check in JIT test program * Mon Mar 07 2016 Petr Pisar - 10.21-4 - Ship README in devel as it covers API and build, not general info