8.43-RC1 bump

This commit is contained in:
Petr Písař 2019-01-28 12:43:40 +01:00
parent 4e41214d91
commit 5ab6228674
10 changed files with 21 additions and 648 deletions

1
.gitignore vendored
View File

@ -32,3 +32,4 @@ pcre-8.10.tar.bz2
/pcre-8.41.tar.bz2
/pcre-8.42-RC1.tar.bz2
/pcre-8.42.tar.bz2
/pcre-8.43-RC1.tar.bz2

View File

@ -1,70 +0,0 @@
From 7abc4de8303e8908eeb96714dac53ae10ff465e3 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date: Sun, 2 Sep 2018 17:05:38 +0000
Subject: [PATCH] Fix anchoring bug in conditional subexpression.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1739 2f5784b3-3f2a-0410-8824-cb99058d5e15
Petr Písař: Ported to 8.42
---
pcre_compile.c | 12 ++++++++++--
testdata/testinput2 | 3 +++
testdata/testoutput2 | 4 ++++
Version 8.42 20-March-2018
--------------------------
diff --git a/pcre_compile.c b/pcre_compile.c
index 3991d6c..6141fb3 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -8682,10 +8682,18 @@ do {
if (!is_anchored(scode, new_map, cd, atomcount)) return FALSE;
}
- /* Positive forward assertions and conditions */
+ /* Positive forward assertion */
- else if (op == OP_ASSERT || op == OP_COND)
+ else if (op == OP_ASSERT)
+ {
+ if (!is_anchored(scode, bracket_map, cd, atomcount)) return FALSE;
+ }
+
+ /* Condition; not anchored if no second branch */
+
+ else if (op == OP_COND)
{
+ if (scode[GET(scode,1)] != OP_ALT) return FALSE;
if (!is_anchored(scode, bracket_map, cd, atomcount)) return FALSE;
}
diff --git a/testdata/testinput2 b/testdata/testinput2
index 8ba4dc4..3528de1 100644
--- a/testdata/testinput2
+++ b/testdata/testinput2
@@ -4257,4 +4257,7 @@ backtracking verbs. --/
ab
aaab
+/(?(?=^))b/
+ abc
+
/-- End of testinput2 --/
diff --git a/testdata/testoutput2 b/testdata/testoutput2
index 61ed8d9..4ccda27 100644
--- a/testdata/testoutput2
+++ b/testdata/testoutput2
@@ -14721,4 +14721,8 @@ No need char
0: ab
1: a
+/(?(?=^))b/
+ abc
+ 0: b
+
/-- End of testinput2 --/
--
2.14.4

View File

@ -1,65 +0,0 @@
From 952cac5f4a17e52aec7d0536f405b25428367840 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date: Fri, 17 Aug 2018 14:50:21 +0000
Subject: [PATCH] Fix bad auto-possessify for certain classes.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1738 2f5784b3-3f2a-0410-8824-cb99058d5e15
Petr Písař: Ported to 8.42.
---
pcre_compile.c | 4 ++--
testdata/testinput4 | 3 +++
testdata/testoutput4 | 4 ++++
diff --git a/pcre_compile.c b/pcre_compile.c
index 6dd8886..3991d6c 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2016 University of Cambridge
+ Copyright (c) 1997-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -3299,7 +3299,7 @@ for(;;)
if ((*xclass_flags & XCL_MAP) == 0)
{
/* No bits are set for characters < 256. */
- if (list[1] == 0) return TRUE;
+ if (list[1] == 0) return (*xclass_flags & XCL_NOT) == 0;
/* Might be an empty repeat. */
continue;
}
diff --git a/testdata/testinput4 b/testdata/testinput4
index 8bdbdac..63368c0 100644
--- a/testdata/testinput4
+++ b/testdata/testinput4
@@ -727,4 +727,7 @@
/\C(\W?ſ)'?{{/8
\\C(\\W?ſ)'?{{
+/[^\x{100}-\x{ffff}]*[\x80-\xff]/8
+ \x{99}\x{99}\x{99}
+
/-- End of testinput4 --/
diff --git a/testdata/testoutput4 b/testdata/testoutput4
index d43c123..69e812c 100644
--- a/testdata/testoutput4
+++ b/testdata/testoutput4
@@ -1277,4 +1277,8 @@ No match
\\C(\\W?ſ)'?{{
No match
+/[^\x{100}-\x{ffff}]*[\x80-\xff]/8
+ \x{99}\x{99}\x{99}
+ 0: \x{99}\x{99}\x{99}
+
/-- End of testinput4 --/
--
2.14.4

View File

@ -1,29 +0,0 @@
From 1aa76cb33f04fcea3127a0859450e5d18369e5e2 Mon Sep 17 00:00:00 2001
From: zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date: Fri, 21 Sep 2018 07:34:10 +0000
Subject: [PATCH] Fix subject buffer overread in JIT.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1740 2f5784b3-3f2a-0410-8824-cb99058d5e15
Petr Písař: Ported to 8.42.
---
pcre_jit_compile.c | 2 +-
diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c
index 2bad74b..bc5f9c0 100644
--- a/pcre_jit_compile.c
+++ b/pcre_jit_compile.c
@@ -9002,7 +9002,7 @@ if (exact > 1)
#ifdef SUPPORT_UTF
&& !common->utf
#endif
- )
+ && type != OP_ANYNL && type != OP_EXTUNI)
{
OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(exact));
add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_GREATER, TMP1, 0, STR_END, 0));
--
2.17.2

View File

@ -1,178 +0,0 @@
From 2ede5a4b4a98add3bbf982f5805e015e8c61c565 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date: Tue, 26 Jun 2018 16:51:43 +0000
Subject: [PATCH] Fix two C++ wrapper bugs, unnoticed for years.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1735 2f5784b3-3f2a-0410-8824-cb99058d5e15
Petr Písař: Ported to 8.42.
diff --git a/pcrecpp.cc b/pcrecpp.cc
index d09c9ab..77a2fed 100644
--- a/pcrecpp.cc
+++ b/pcrecpp.cc
@@ -80,6 +80,24 @@ static const string empty_string;
// If the user doesn't ask for any options, we just use this one
static RE_Options default_options;
+// Specials for the start of patterns. See comments where start_options is used
+// below. (PH June 2018)
+static const char *start_options[] = {
+ "(*UTF8)",
+ "(*UTF)",
+ "(*UCP)",
+ "(*NO_START_OPT)",
+ "(*NO_AUTO_POSSESS)",
+ "(*LIMIT_RECURSION=",
+ "(*LIMIT_MATCH=",
+ "(*CRLF)",
+ "(*CR)",
+ "(*BSR_UNICODE)",
+ "(*BSR_ANYCRLF)",
+ "(*ANYCRLF)",
+ "(*ANY)",
+ "" };
+
void RE::Init(const string& pat, const RE_Options* options) {
pattern_ = pat;
if (options == NULL) {
@@ -135,7 +153,49 @@ pcre* RE::Compile(Anchor anchor) {
} else {
// Tack a '\z' at the end of RE. Parenthesize it first so that
// the '\z' applies to all top-level alternatives in the regexp.
- string wrapped = "(?:"; // A non-counting grouping operator
+
+ /* When this code was written (for PCRE 6.0) it was enough just to
+ parenthesize the entire pattern. Unfortunately, when the feature of
+ starting patterns with (*UTF8) or (*CR) etc. was added to PCRE patterns,
+ this code was never updated. This bug was not noticed till 2018, long after
+ PCRE became obsolescent and its maintainer no longer around. Since PCRE is
+ frozen, I have added a hack to check for all the existing "start of
+ pattern" specials - knowing that no new ones will ever be added. I am not a
+ C++ programmer, so the code style is no doubt crude. It is also
+ inefficient, but is only run when the pattern starts with "(*".
+ PH June 2018. */
+
+ string wrapped = "";
+
+ if (pattern_.c_str()[0] == '(' && pattern_.c_str()[1] == '*') {
+ int kk, klen, kmat;
+ for (;;) { // Loop for any number of leading items
+
+ for (kk = 0; start_options[kk][0] != 0; kk++) {
+ klen = strlen(start_options[kk]);
+ kmat = strncmp(pattern_.c_str(), start_options[kk], klen);
+ if (kmat >= 0) break;
+ }
+ if (kmat != 0) break; // Not found
+
+ // If the item ended in "=" we must copy digits up to ")".
+
+ if (start_options[kk][klen-1] == '=') {
+ while (isdigit(pattern_.c_str()[klen])) klen++;
+ if (pattern_.c_str()[klen] != ')') break; // Syntax error
+ klen++;
+ }
+
+ // Move the item from the pattern to the start of the wrapped string.
+
+ wrapped += pattern_.substr(0, klen);
+ pattern_.erase(0, klen);
+ }
+ }
+
+ // Wrap the rest of the pattern.
+
+ wrapped += "(?:"; // A non-counting grouping operator
wrapped += pattern_;
wrapped += ")\\z";
re = pcre_compile(wrapped.c_str(), pcre_options,
@@ -415,7 +475,7 @@ int RE::GlobalReplace(const StringPiece& rewrite,
matchend++;
}
// We also need to advance more than one char if we're in utf8 mode.
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
if (options_.utf8()) {
while (matchend < static_cast<int>(str->length()) &&
((*str)[matchend] & 0xc0) == 0x80)
diff --git a/pcrecpp_unittest.cc b/pcrecpp_unittest.cc
index 4b15fbe..255066f 100644
--- a/pcrecpp_unittest.cc
+++ b/pcrecpp_unittest.cc
@@ -309,7 +309,7 @@ static void TestReplace() {
"@aa",
"@@@",
3 },
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
{ "b*",
"bb",
"\xE3\x83\x9B\xE3\x83\xBC\xE3\x83\xA0\xE3\x81\xB8", // utf8
@@ -327,7 +327,7 @@ static void TestReplace() {
{ "", NULL, NULL, NULL, NULL, 0 }
};
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
const bool support_utf8 = true;
#else
const bool support_utf8 = false;
@@ -535,7 +535,7 @@ static void TestQuoteMetaLatin1() {
}
static void TestQuoteMetaUtf8() {
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
TestQuoteMeta("Pl\xc3\xa1\x63ido Domingo", pcrecpp::UTF8());
TestQuoteMeta("xyz", pcrecpp::UTF8()); // No fancy utf8
TestQuoteMeta("\xc2\xb0", pcrecpp::UTF8()); // 2-byte utf8 (degree symbol)
@@ -1178,7 +1178,7 @@ int main(int argc, char** argv) {
CHECK(re.error().empty()); // Must have no error
}
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
// Check UTF-8 handling
{
printf("Testing UTF-8 handling\n");
@@ -1202,6 +1202,24 @@ int main(int argc, char** argv) {
CHECK(re_test1.FullMatch(utf8_string));
RE re_test2("...", pcrecpp::UTF8());
CHECK(re_test2.FullMatch(utf8_string));
+
+ // PH added these tests for leading option settings
+
+ RE re_testZ1("(*UTF8)...");
+ CHECK(re_testZ1.FullMatch(utf8_string));
+
+ RE re_testZ2("(*UTF)...");
+ CHECK(re_testZ2.FullMatch(utf8_string));
+
+ RE re_testZ3("(*UCP)(*UTF)...");
+ CHECK(re_testZ3.FullMatch(utf8_string));
+
+ RE re_testZ4("(*UCP)(*LIMIT_MATCH=1000)(*UTF)...");
+ CHECK(re_testZ4.FullMatch(utf8_string));
+
+ RE re_testZ5("(*UCP)(*LIMIT_MATCH=1000)(*ANY)(*UTF)...");
+ CHECK(re_testZ5.FullMatch(utf8_string));
+
// Check that '.' matches one byte or UTF-8 character
// according to the mode.
@@ -1248,7 +1266,7 @@ int main(int argc, char** argv) {
CHECK(!match_sentence.FullMatch(target));
CHECK(!match_sentence_re.FullMatch(target));
}
-#endif /* def SUPPORT_UTF8 */
+#endif /* def SUPPORT_UTF */
printf("Testing error reporting\n");
--
2.14.4

View File

@ -1,36 +0,0 @@
From 6d8fa98d5167bdd915ce1e32bcb6aaed078e5938 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date: Tue, 26 Jun 2018 17:04:02 +0000
Subject: [PATCH] Fix typos in pcrgrep.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1736 2f5784b3-3f2a-0410-8824-cb99058d5e15
Petr Písař: Ported to 8.42.
diff --git a/pcregrep.c b/pcregrep.c
index a406be9..5982406 100644
--- a/pcregrep.c
+++ b/pcregrep.c
@@ -2252,7 +2252,7 @@ if (isdirectory(pathname))
int fnlength = strlen(pathname) + strlen(nextfile) + 2;
if (fnlength > 2048)
{
- fprintf(stderr, "pcre2grep: recursive filename is too long\n");
+ fprintf(stderr, "pcregrep: recursive filename is too long\n");
rc = 2;
break;
}
@@ -3034,7 +3034,7 @@ LC_ALL environment variable is set, and if so, use it. */
if (locale == NULL)
{
locale = getenv("LC_ALL");
- locale_from = "LCC_ALL";
+ locale_from = "LC_ALL";
}
if (locale == NULL)
--
2.14.4

View File

@ -1,89 +0,0 @@
From a65e1b693110caa27fe8f724583fc28ce5924026 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date: Sat, 20 Oct 2018 09:38:44 +0000
Subject: [PATCH] Fix zero-repeat leading subroutine call first character
error.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1741 2f5784b3-3f2a-0410-8824-cb99058d5e15
Petr Písař: Ported to 8.42.
---
pcre_compile.c | 2 ++
testdata/testinput1 | 15 +++++++++++++++
testdata/testoutput1 | 24 ++++++++++++++++++++++++
diff --git a/pcre_compile.c b/pcre_compile.c
index 6141fb3..079d30a 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -7642,6 +7642,8 @@ for (;; ptr++)
/* Can't determine a first byte now */
if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
+ zerofirstchar = firstchar;
+ zerofirstcharflags = firstcharflags;
continue;
diff --git a/testdata/testinput1 b/testdata/testinput1
index 5c23f41..02e4f48 100644
--- a/testdata/testinput1
+++ b/testdata/testinput1
@@ -5742,4 +5742,19 @@ AbcdCBefgBhiBqz
/X+(?#comment)?/
>XXX<
+/ (?<word> \w+ )* \. /xi
+ pokus.
+
+/(?(DEFINE) (?<word> \w+ ) ) (?&word)* \./xi
+ pokus.
+
+/(?(DEFINE) (?<word> \w+ ) ) ( (?&word)* ) \./xi
+ pokus.
+
+/(?&word)* (?(DEFINE) (?<word> \w+ ) ) \./xi
+ pokus.
+
+/(?&word)* \. (?<word> \w+ )/xi
+ pokus.hokus
+
/-- End of testinput1 --/
diff --git a/testdata/testoutput1 b/testdata/testoutput1
index eff8ecc..e6147e6 100644
--- a/testdata/testoutput1
+++ b/testdata/testoutput1
@@ -9446,4 +9446,28 @@ No match
>XXX<
0: X
+/ (?<word> \w+ )* \. /xi
+ pokus.
+ 0: pokus.
+ 1: pokus
+
+/(?(DEFINE) (?<word> \w+ ) ) (?&word)* \./xi
+ pokus.
+ 0: pokus.
+
+/(?(DEFINE) (?<word> \w+ ) ) ( (?&word)* ) \./xi
+ pokus.
+ 0: pokus.
+ 1: <unset>
+ 2: pokus
+
+/(?&word)* (?(DEFINE) (?<word> \w+ ) ) \./xi
+ pokus.
+ 0: pokus.
+
+/(?&word)* \. (?<word> \w+ )/xi
+ pokus.hokus
+ 0: pokus.hokus
+ 1: hokus
+
/-- End of testinput1 --/
--
2.17.2

View File

@ -1,139 +0,0 @@
From 10e4adbfe9aab5869079fba5edc0ce56fa1b078e Mon Sep 17 00:00:00 2001
From: zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date: Thu, 3 Jan 2019 09:35:02 +0000
Subject: [PATCH] JIT compiler update.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1745 2f5784b3-3f2a-0410-8824-cb99058d5e15
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
sljit/sljitConfigInternal.h | 2 +-
sljit/sljitNativeARM_64.c | 20 ++++++++++----------
sljit/sljitNativePPC_common.c | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/sljit/sljitConfigInternal.h b/sljit/sljitConfigInternal.h
index f5703e8..ba60311 100644
--- a/sljit/sljitConfigInternal.h
+++ b/sljit/sljitConfigInternal.h
@@ -530,7 +530,7 @@ typedef double sljit_f64;
#endif /* !SLJIT_FUNC */
#ifndef SLJIT_INDIRECT_CALL
-#if ((defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) && (defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN)) \
+#if ((defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) && (!defined _CALL_ELF || _CALL_ELF == 1)) \
|| ((defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) && defined _AIX)
/* It seems certain ppc compilers use an indirect addressing for functions
which makes things complicated. */
diff --git a/sljit/sljitNativeARM_64.c b/sljit/sljitNativeARM_64.c
index 27af741..b015695 100644
--- a/sljit/sljitNativeARM_64.c
+++ b/sljit/sljitNativeARM_64.c
@@ -51,7 +51,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = {
0, 0, 1, 2, 3, 4, 5, 6, 7
};
-#define W_OP (1 << 31)
+#define W_OP (1u << 31)
#define RD(rd) (reg_map[rd])
#define RT(rt) (reg_map[rt])
#define RN(rn) (reg_map[rn] << 5)
@@ -560,7 +560,7 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s
/* dst must be register, TMP_REG1
arg1 must be register, TMP_REG1, imm
arg2 must be register, TMP_REG2, imm */
- sljit_ins inv_bits = (flags & INT_OP) ? (1 << 31) : 0;
+ sljit_ins inv_bits = (flags & INT_OP) ? W_OP : 0;
sljit_ins inst_bits;
sljit_s32 op = (flags & 0xffff);
sljit_s32 reg;
@@ -710,7 +710,7 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s
return push_inst(compiler, ORR | RD(dst) | RN(TMP_ZERO) | RM(arg2));
case SLJIT_MOV_U8:
SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
- return push_inst(compiler, (UBFM ^ (1 << 31)) | RD(dst) | RN(arg2) | (7 << 10));
+ return push_inst(compiler, (UBFM ^ W_OP) | RD(dst) | RN(arg2) | (7 << 10));
case SLJIT_MOV_S8:
SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
if (!(flags & INT_OP))
@@ -718,7 +718,7 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s
return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (7 << 10));
case SLJIT_MOV_U16:
SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
- return push_inst(compiler, (UBFM ^ (1 << 31)) | RD(dst) | RN(arg2) | (15 << 10));
+ return push_inst(compiler, (UBFM ^ W_OP) | RD(dst) | RN(arg2) | (15 << 10));
case SLJIT_MOV_S16:
SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
if (!(flags & INT_OP))
@@ -728,7 +728,7 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s
SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
if ((flags & INT_OP) && dst == arg2)
return SLJIT_SUCCESS;
- return push_inst(compiler, (ORR ^ (1 << 31)) | RD(dst) | RN(TMP_ZERO) | RM(arg2));
+ return push_inst(compiler, (ORR ^ W_OP) | RD(dst) | RN(TMP_ZERO) | RM(arg2));
case SLJIT_MOV_S32:
SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
if ((flags & INT_OP) && dst == arg2)
@@ -1080,7 +1080,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *comp
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
{
- sljit_ins inv_bits = (op & SLJIT_I32_OP) ? (1 << 31) : 0;
+ sljit_ins inv_bits = (op & SLJIT_I32_OP) ? W_OP : 0;
CHECK_ERROR();
CHECK(check_sljit_emit_op0(compiler, op));
@@ -1360,7 +1360,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_comp
sljit_ins inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0;
if (GET_OPCODE(op) == SLJIT_CONV_S32_FROM_F64)
- inv_bits |= (1 << 31);
+ inv_bits |= W_OP;
if (src & SLJIT_MEM) {
emit_fop_mem(compiler, (op & SLJIT_F32_OP) ? INT_SIZE : WORD_SIZE, TMP_FREG1, src, srcw);
@@ -1382,7 +1382,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp
sljit_ins inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0;
if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32)
- inv_bits |= (1 << 31);
+ inv_bits |= W_OP;
if (src & SLJIT_MEM) {
emit_op_mem(compiler, ((GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32) ? INT_SIZE : WORD_SIZE), TMP_REG1, src, srcw, TMP_REG1);
@@ -1662,7 +1662,7 @@ static SLJIT_INLINE struct sljit_jump* emit_cmp_to0(struct sljit_compiler *compi
sljit_s32 src, sljit_sw srcw)
{
struct sljit_jump *jump;
- sljit_ins inv_bits = (type & SLJIT_I32_OP) ? (1 << 31) : 0;
+ sljit_ins inv_bits = (type & SLJIT_I32_OP) ? W_OP : 0;
SLJIT_ASSERT((type & 0xff) == SLJIT_EQUAL || (type & 0xff) == SLJIT_NOT_EQUAL);
ADJUST_LOCAL_OFFSET(src, srcw);
@@ -1787,7 +1787,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil
sljit_s32 dst_reg,
sljit_s32 src, sljit_sw srcw)
{
- sljit_ins inv_bits = (dst_reg & SLJIT_I32_OP) ? (1 << 31) : 0;
+ sljit_ins inv_bits = (dst_reg & SLJIT_I32_OP) ? W_OP : 0;
sljit_ins cc;
CHECK_ERROR();
diff --git a/sljit/sljitNativePPC_common.c b/sljit/sljitNativePPC_common.c
index 5ef4ac9..b34e396 100644
--- a/sljit/sljitNativePPC_common.c
+++ b/sljit/sljitNativePPC_common.c
@@ -42,7 +42,7 @@ typedef sljit_u32 sljit_ins;
#include <sys/cache.h>
#endif
-#if (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
+#if (defined _CALL_ELF && _CALL_ELF == 2)
#define SLJIT_PASS_ENTRY_ADDR_TO_CALL 1
#endif
--
2.17.2

View File

@ -1,8 +1,8 @@
# Is this a stable/testing release:
#%%global rcversion RC1
%global rcversion RC1
Name: pcre
Version: 8.42
Release: %{?rcversion:0.}7%{?rcversion:.%rcversion}%{?dist}
Version: 8.43
Release: %{?rcversion:0.}1%{?rcversion:.%rcversion}%{?dist}
%global myversion %{version}%{?rcversion:-%rcversion}
Summary: Perl-compatible regular expression library
## Source package only:
@ -35,34 +35,11 @@ Patch0: pcre-8.21-multilib.patch
Patch1: pcre-8.32-refused_spelling_terminated.patch
# Fix recursion stack estimator, upstream bug #2173, refused by upstream
Patch2: pcre-8.41-fix_stack_estimator.patch
# Fix handling UTF and start-of-pattern options in C++ wrapper,
# upstream bug #2283, in upstream after 8.42
Patch3: pcre-8.42-Fix-two-C-wrapper-bugs-unnoticed-for-years.patch
# Fix an error message and locale handling in pcregrep tool,
# in upstream after 8.42
Patch4: pcre-8.42-Fix-typos-in-pcrgrep.patch
# Fix autopossessifying a repeated negative class with no characters less than
# 256 that is followed by a positive class with only characters less than 256,
# upstream bug #2300, in upstream after 8.42
Patch5: pcre-8.42-Fix-bad-auto-possessify-for-certain-classes.patch
# Fix anchoring in conditionals with only one branch, upstream bug #2307,
# in upstream after 8.42
Patch6: pcre-8.42-Fix-anchoring-bug-in-conditional-subexpression.patch
# Fix a subject buffer overread in JIT when UTF is disabled and \X or \R has
# a greater than 1 fixed quantifier, in upstream after 8.42
Patch7: pcre-8.42-Fix-subject-buffer-overread-in-JIT.patch
# Fix matching a zero-repeated subroutine call at a start of a pattern,
# upstream bug #2332, in upstream after 8.42
Patch8: pcre-8.42-Fix-zero-repeat-leading-subroutine-call-first-charac.patch
# Fix OpenPOWER 64-bit ELFv2 ABI detection in JIT compiler, upstream bug #2353,
# fix an undefined behavior in aarch64 JIT compiler, upstream bug #2355,
# in upstream after 8.42
Patch9: pcre-8.42-JIT-compiler-update.patch
# Link applications to PCRE-specific symbols when using POSIX API, bug #1667614,
# upstream bug 1830, partially borrowed from PCRE2, proposed to upstream,
# This amends ABI, application built with this patch cannot run with
# previous libpcreposix builds.
Patch10: pcre-8.42-Declare-POSIX-regex-function-names-as-macros-to-PCRE.patch
Patch3: pcre-8.42-Declare-POSIX-regex-function-names-as-macros-to-PCRE.patch
BuildRequires: readline-devel
BuildRequires: autoconf
BuildRequires: automake
@ -148,13 +125,6 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest.
%patch1 -p1
%patch2 -p2
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
# Because of rpath patch
libtoolize --copy --force
autoreconf -vif
@ -183,10 +153,10 @@ done
--enable-pcre16 \
--enable-pcre32 \
--disable-silent-rules
make %{?_smp_mflags}
%{make_build}
%install
make install DESTDIR=$RPM_BUILD_ROOT
%{make_install}
# Get rid of unneeded *.la files
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
# These are handled by %%doc in %%files
@ -205,24 +175,29 @@ make %{?_smp_mflags} check VERBOSE=yes
%ldconfig_scriptlets cpp
%files
%{_libdir}/libpcre.so.*
%{_libdir}/libpcreposix.so.*
%{_libdir}/libpcre.so.1
%{_libdir}/libpcre.so.1.*
%{_libdir}/libpcreposix.so.0
%{_libdir}/libpcreposix.so.0.*
%{!?_licensedir:%global license %%doc}
%license COPYING LICENCE
%doc AUTHORS NEWS
%files utf16
%{_libdir}/libpcre16.so.*
%{_libdir}/libpcre16.so.0
%{_libdir}/libpcre16.so.0.*
%license COPYING LICENCE
%doc AUTHORS NEWS
%files utf32
%{_libdir}/libpcre32.so.*
%{_libdir}/libpcre32.so.0
%{_libdir}/libpcre32.so.0.*
%license COPYING LICENCE
%doc AUTHORS NEWS
%files cpp
%{_libdir}/libpcrecpp.so.*
%{_libdir}/libpcrecpp.so.0
%{_libdir}/libpcrecpp.so.0.*
%files doc
%doc ChangeLog
@ -249,6 +224,9 @@ make %{?_smp_mflags} check VERBOSE=yes
%{_mandir}/man1/pcretest.*
%changelog
* Mon Jan 28 2019 Petr Pisar <ppisar@redhat.com> - 8.43-0.1.RC1
- 8.43-RC1 bump
* Wed Jan 23 2019 Petr Pisar <ppisar@redhat.com> - 8.42-7
- Link applications to PCRE-specific symbols when using POSIX API (bug #1667614)

View File

@ -1 +1 @@
SHA512 (pcre-8.42.tar.bz2) = b47b923108f6ee0c31409b79d0888314271b482a22590e164d02f21d2112fba22dd0342c24f9ba0f5fcc5b8c65550bad08c476e30a2fc79b34ecf4601ed82f3d
SHA512 (pcre-8.43-RC1.tar.bz2) = a3963030028287c0afd9f124de7043ca35c3bddce0850e1d553668d0cbdaa8c1d53e109bf0a87f5dd4eef2393286e105d724ac01f18da12bdb0313a876fc4af1