Port pcre-8.44-JIT-compiler-update-for-Intel-CET.patch to 8.44 archive

There is a file excluded.
This commit is contained in:
Petr Písař 2021-01-11 14:18:20 +01:00
parent f54ff1daa3
commit 6b02ed2acc

View File

@ -1,8 +1,15 @@
From 0e2fa06af91265ce38464733080e4cf6aa987c6f Mon Sep 17 00:00:00 2001
From 52a4bebc87f000f1df3cf10ec8e4533dc9acad92 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Sun, 20 Dec 2020 13:32:56 -0800
Subject: [PATCH 1/2] JIT compiler update for Intel CET
Subject: [PATCH] JIT compiler update for Intel CET
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Petr Pisar: Ported to 8.44 tarball from
<https://lists.exim.org/lurker/message/20201220.222017.b177b313.en.html>.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
pcre_jit_compile.c | 43 ++++---
sljit/sljitConfig.h | 17 ++-
@ -22,9 +29,8 @@ Subject: [PATCH 1/2] JIT compiler update for Intel CET
sljit/sljitNativeX86_32.c | 50 ++++++--
sljit/sljitNativeX86_64.c | 28 ++++-
sljit/sljitNativeX86_common.c | 209 ++++++++++++++++++++++++++++++--
sljit/sljitProtExecAllocator.c | 6 +
sljit/sljitUtils.c | 157 +++++++++++++++++-------
20 files changed, 959 insertions(+), 407 deletions(-)
19 files changed, 953 insertions(+), 407 deletions(-)
diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c
index 4dcf8fc..9e67a20 100644
@ -2369,32 +2375,6 @@ index 6296da5..eea9510 100644
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 reg)
{
CHECK_REG_INDEX(check_sljit_get_register_index(reg));
diff --git a/sljit/sljitProtExecAllocator.c b/sljit/sljitProtExecAllocator.c
index 8a5b2b3..8425a2e 100644
--- a/sljit/sljitProtExecAllocator.c
+++ b/sljit/sljitProtExecAllocator.c
@@ -97,7 +97,9 @@ struct chunk_header {
#endif
int mkostemp(char *template, int flags);
+#if !defined(__NetBSD__)
char *secure_getenv(const char *name);
+#endif
static SLJIT_INLINE int create_tempfile(void)
{
@@ -124,7 +126,11 @@ static SLJIT_INLINE int create_tempfile(void)
tmp_name_len = 4;
#endif
+#if defined(__NetBSD__)
+ dir = getenv("TMPDIR");
+#else
dir = secure_getenv("TMPDIR");
+#endif
if (dir) {
len = strlen(dir);
if (len > 0 && len < sizeof(tmp_name)) {
diff --git a/sljit/sljitUtils.c b/sljit/sljitUtils.c
index 857492a..972cad9 100644
--- a/sljit/sljitUtils.c
@ -2661,5 +2641,5 @@ index 857492a..972cad9 100644
#endif
--
2.29.2
2.26.2