Fix an ovector check in JIT test program

This commit is contained in:
Petr Písař 2016-06-03 10:35:41 +02:00
parent f1cd1d424b
commit 0c68f1730f
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,34 @@
From f4778a47d6d454b71d227d359e874757b7ad1819 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
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

View File

@ -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 Patch4: pcre2-10.21-Fix-typo-in-pcre2_study.patch
# Fix a race in JIT locking condition, fixed in upstream after 10.21 # 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 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 # New libtool to get rid of RPATH and to use distribution autotools
BuildRequires: autoconf BuildRequires: autoconf
@ -115,6 +117,7 @@ Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test.
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1 %patch5 -p1
%patch6 -p1
# Because of multilib patch # Because of multilib patch
libtoolize --copy --force libtoolize --copy --force
autoreconf -vif autoreconf -vif
@ -212,6 +215,7 @@ make %{?_smp_mflags} check VERBOSE=yes
%changelog %changelog
* Fri Jun 03 2016 Petr Pisar <ppisar@redhat.com> - 10.21-5 * Fri Jun 03 2016 Petr Pisar <ppisar@redhat.com> - 10.21-5
- Fix a race in JIT locking condition - Fix a race in JIT locking condition
- Fix an ovector check in JIT test program
* Mon Mar 07 2016 Petr Pisar <ppisar@redhat.com> - 10.21-4 * Mon Mar 07 2016 Petr Pisar <ppisar@redhat.com> - 10.21-4
- Ship README in devel as it covers API and build, not general info - Ship README in devel as it covers API and build, not general info