From 69ba4fe06e485fdf0d22eb068abf551b0211625f Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 16 May 2020 17:38:10 +0200 Subject: extra/re2: patch for failing compile-test --- extra/re2/PKGBUILD | 17 +++++++++++++++++ .../re2-2020-05-01-compile-test-out-of-memory-fix.patch | 12 ++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 extra/re2/PKGBUILD create mode 100644 extra/re2/re2-2020-05-01-compile-test-out-of-memory-fix.patch diff --git a/extra/re2/PKGBUILD b/extra/re2/PKGBUILD new file mode 100644 index 00000000..1cd34742 --- /dev/null +++ b/extra/re2/PKGBUILD @@ -0,0 +1,17 @@ +# compiler-test fails in InsufficientMemory test due to the change of +# the size of the DFA +# bug: https://github.com/google/re2/issues/256 +# patch: https://github.com/google/re2/commit/bde1ea09550a61b4a092cdf0e3ba8dca4200947a +source+=('re2-2020-05-01-compile-test-out-of-memory-fix.patch') +sha256sums+=('bef199b3c77cd6477d9f3950acc5d017ce4a53e447827f01a4706e7e8980b220') + +eval "$( + { + declare -f prepare || \ + printf 'prepare() {\n}\n' + } \ + | sed ' + $ i cd "$pkgname-$_re2ver"; patch -Np1 -i "${srcdir}"/re2-2020-05-01-compile-test-out-of-memory-fix.patch + ' +)" + diff --git a/extra/re2/re2-2020-05-01-compile-test-out-of-memory-fix.patch b/extra/re2/re2-2020-05-01-compile-test-out-of-memory-fix.patch new file mode 100644 index 00000000..8b8b874c --- /dev/null +++ b/extra/re2/re2-2020-05-01-compile-test-out-of-memory-fix.patch @@ -0,0 +1,12 @@ +diff -rauN re2-2020-05-01/re2/testing/compile_test.cc re2-2020-05-01-compile-test-out-of-memory-fix-patch/re2/testing/compile_test.cc +--- re2-2020-05-01/re2/testing/compile_test.cc 2020-04-23 17:56:11.000000000 +0200 ++++ re2-2020-05-01-compile-test-out-of-memory-fix-patch/re2/testing/compile_test.cc 2020-05-16 17:17:05.570251742 +0200 +@@ -236,7 +236,7 @@ + "^(?P[^\\s]+)\\s+(?P[^\\s]+)\\s+(?P.+)$", + Regexp::LikePerl, NULL); + EXPECT_TRUE(re != NULL); +- Prog* prog = re->CompileToProg(920); ++ Prog* prog = re->CompileToProg(850); + // If the memory budget has been exhausted, compilation should fail + // and return NULL instead of trying to do anything with NoMatch(). + EXPECT_TRUE(prog == NULL); -- cgit v1.2.3