From f20657ab313a87cb8c54ec241e8dfb15f1f416862e7e0496bfa8281d678c9e99 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 4 Oct 2013 21:49:55 +0000 Subject: [PATCH 1/3] Disable JIT (bnc#839358) OBS-URL: https://build.opensuse.org/package/show/server:http/varnish?expand=0&rev=59 --- varnish.changes | 5 +++++ varnish.spec | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/varnish.changes b/varnish.changes index 9221c50..cd5c686 100644 --- a/varnish.changes +++ b/varnish.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 4 21:48:01 UTC 2013 - jengelh@inai.de + +- Deactivate libpcre JIT (bnc#839358) + ------------------------------------------------------------------- Sun Sep 23 21:30:35 UTC 2012 - nmo.marques@gmail.com diff --git a/varnish.spec b/varnish.spec index 1d0ed89..00e2963 100644 --- a/varnish.spec +++ b/varnish.spec @@ -97,9 +97,8 @@ This package holds the development files for varnish. %setup -q %build -%if 0%{?suse_version} > 1000 -export CFLAGS="%optflags -fstack-protector" -%endif +# bnc#839358: Force-deactivate JIT +export CFLAGS="%optflags -fstack-protector -DPCRE_STUDY_JIT_COMPILE=0" %configure --disable-static \ --localstatedir=%_localstatedir/cache/ \ --enable-developer-warnings From d11bada4ecda083501b70ad315d5db1fa898046424dc83d54b05d575b71f1afc Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 4 Oct 2013 22:47:06 +0000 Subject: [PATCH 2/3] Disable JIT with patch, the define was overridden by pcre.h (bnc#839358) OBS-URL: https://build.opensuse.org/package/show/server:http/varnish?expand=0&rev=60 --- varnish-disable-pcrejit.diff | 27 +++++++++++++++++++++++++++ varnish.spec | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 varnish-disable-pcrejit.diff diff --git a/varnish-disable-pcrejit.diff b/varnish-disable-pcrejit.diff new file mode 100644 index 0000000..2d60e24 --- /dev/null +++ b/varnish-disable-pcrejit.diff @@ -0,0 +1,27 @@ +From: Piotr Jankowski +Date: 2013-09-10 10:55:57 CEST +References: http://bugzilla.novell.com/show_bug.cgi?id=839358 +References: https://www.varnish-cache.org/trac/ticket/1191 + +"The JIT compiler is broken on some versions of PCRE, at least on +i386, so disable it by default." + +--- + lib/libvarnish/vre.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +Index: varnish-3.0.3/lib/libvarnish/vre.c +=================================================================== +--- varnish-3.0.3.orig/lib/libvarnish/vre.c ++++ varnish-3.0.3/lib/libvarnish/vre.c +@@ -40,9 +40,8 @@ struct vre { + pcre_extra *re_extra; + }; + +-#ifndef PCRE_STUDY_JIT_COMPILE ++#undef PCRE_STUDY_JIT_COMPILE + #define PCRE_STUDY_JIT_COMPILE 0 +-#endif + + /* + * We don't want to spread or even expose the majority of PCRE options diff --git a/varnish.spec b/varnish.spec index 00e2963..f37b26f 100644 --- a/varnish.spec +++ b/varnish.spec @@ -33,6 +33,7 @@ Source5: varnish.logrotate Source6: varnishlog.init Source7: varnish.service Source8: varnishlog.service +Patch1: varnish-disable-pcrejit.diff BuildRoot: %_tmppath/%name-%version-build BuildRequires: libxslt, ncurses-devel, pcre-devel @@ -95,6 +96,7 @@ This package holds the development files for varnish. %prep %setup -q +%patch -P 1 -p1 %build # bnc#839358: Force-deactivate JIT From 018e638de7eed7c0dec52d13b787e6efdcf8563b9e6dfcc602ccc16f6c26cbbb Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 6 Oct 2013 11:38:00 +0000 Subject: [PATCH 3/3] blabla OBS-URL: https://build.opensuse.org/package/show/server:http/varnish?expand=0&rev=61 --- varnish.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/varnish.changes b/varnish.changes index cd5c686..7169b95 100644 --- a/varnish.changes +++ b/varnish.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Fri Oct 4 21:48:01 UTC 2013 - jengelh@inai.de -- Deactivate libpcre JIT (bnc#839358) +- Deactivate libpcre JIT (bnc#839358), add varnish-disable-pcrejit.diff ------------------------------------------------------------------- Sun Sep 23 21:30:35 UTC 2012 - nmo.marques@gmail.com