diff options
author | maxim-yurchuk <maxim-yurchuk@yandex-team.com> | 2024-10-09 12:29:46 +0300 |
---|---|---|
committer | maxim-yurchuk <maxim-yurchuk@yandex-team.com> | 2024-10-09 13:14:22 +0300 |
commit | 9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch) | |
tree | a8fb3181d5947c0d78cf402aa56e686130179049 /contrib/libs/pcre/patches | |
parent | a44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff) | |
download | ydb-9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80.tar.gz |
publishFullContrib: true for ydb
<HIDDEN_URL>
commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/libs/pcre/patches')
-rw-r--r-- | contrib/libs/pcre/patches/fix-group-name-comparison.patch | 24 | ||||
-rw-r--r-- | contrib/libs/pcre/patches/posix.patch | 20 | ||||
-rw-r--r-- | contrib/libs/pcre/patches/turn-off-jit-on-request.patch | 32 |
3 files changed, 76 insertions, 0 deletions
diff --git a/contrib/libs/pcre/patches/fix-group-name-comparison.patch b/contrib/libs/pcre/patches/fix-group-name-comparison.patch new file mode 100644 index 0000000000..e4bba332d1 --- /dev/null +++ b/contrib/libs/pcre/patches/fix-group-name-comparison.patch @@ -0,0 +1,24 @@ +From: Александр Сомов <somov@yandex-team.ru> +Date: Fri, 28 Apr 2017 13:18:37 +0000 +Subject: [PATCH] Fix Clang 3.9 build #35 Clang 3.9 uses the strict memcmp mode + in the address sanitizer by default. Do not use memcmp to compare strings. + +DEVTOOLS-2459 +REVIEW: 269899 + +git-svn-id: svn+ssh://arcadia.yandex.ru/arc/trunk/arcadia/contrib/libs/pcre@2895347 41d65440-b5be-11dd-afe3-b2e846d9b4f8 + +This is compatible only with the 8-bit pcre build. + +This was fixed in pcre2 in a different way: +https://vcs.pcre.org/pcre2/code/trunk/src/pcre2_compile.c?annotate=185&pathrev=185#l7344 + +--- a/pcre_compile.c ++++ b/pcre_compile.c +@@ -8978,5 +8978,5 @@ pcre_uchar *slot = cd->name_table; + for (i = 0; i < cd->names_found; i++) + { +- int crc = memcmp(name, slot+IMM2_SIZE, IN_UCHARS(length)); ++ int crc = strncmp(name, slot+IMM2_SIZE, IN_UCHARS(length)); + if (crc == 0 && slot[IMM2_SIZE+length] != 0) + crc = -1; /* Current name is a substring */ diff --git a/contrib/libs/pcre/patches/posix.patch b/contrib/libs/pcre/patches/posix.patch new file mode 100644 index 0000000000..b68a8621ff --- /dev/null +++ b/contrib/libs/pcre/patches/posix.patch @@ -0,0 +1,20 @@ +From: Георгий Кондратьев <orivej@yandex-team.ru> +Date: Sun, 22 Sep 2019 17:28:22 +0000 +Subject: [PATCH] Rename PCRE POSIX regex symbols. DEVTOOLS-5955 + +They are subtly ABI-incompatible with libc regex due to values of REG_NOMATCH and other constants. + +REVIEW: 962891 + +--- a/pcreposix.h ++++ b/pcreposix.h +@@ -134,4 +134,9 @@ file. */ + /* The functions */ + ++#define regcomp pcre_regcomp ++#define regexec pcre_regexec ++#define regerror pcre_regerror ++#define regfree pcre_regfree ++ + PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int); + PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t, diff --git a/contrib/libs/pcre/patches/turn-off-jit-on-request.patch b/contrib/libs/pcre/patches/turn-off-jit-on-request.patch new file mode 100644 index 0000000000..0d09fa1df2 --- /dev/null +++ b/contrib/libs/pcre/patches/turn-off-jit-on-request.patch @@ -0,0 +1,32 @@ +From: Дмитрий Потапов <orivej@yandex-team.ru> +Date: Sun, 14 Feb 2021 19:43:48 +0300 +Subject: [PATCH] Conditional PCRE JIT compilation. + +PCRE JIT adds ≈104KB to binary size which can be critical for embedded software, so we need turn off switch which can be overriden in ya.make. + +REVIEW: 1640869 + +--- a/config.h ++++ b/config.h +@@ -293,8 +293,10 @@ + backward compatibility; new code need not use it. */ + #define STDC_HEADERS 1 + ++#ifdef ARCADIA_PCRE_ENABLE_JIT + /* Define to any value to enable support for Just-In-Time compiling. */ + #define SUPPORT_JIT /**/ ++#endif + + /* Define to any value to allow pcregrep to be linked with libbz2, so that it + is able to handle .bz2 files. */ +@@ -319,8 +321,10 @@ + /* Define to any value to enable the 8 bit PCRE library. */ + #define SUPPORT_PCRE8 /**/ + ++#ifdef ARCADIA_PCRE_ENABLE_JIT + /* Define to any value to enable JIT support in pcregrep. */ + #define SUPPORT_PCREGREP_JIT /**/ ++#endif + + /* Define to any value to enable support for Unicode properties. */ + #define SUPPORT_UCP /**/ |