[arch-commits] Commit in squid/trunk (PKGBUILD squid-r13407.patch)
Sergej Pupykin
spupykin at nymeria.archlinux.org
Mon Jun 30 16:29:47 UTC 2014
Date: Monday, June 30, 2014 @ 18:29:47
Author: spupykin
Revision: 113803
upgpkg: squid 3.4.6-2
upd
Added:
squid/trunk/squid-r13407.patch
Modified:
squid/trunk/PKGBUILD
--------------------+
PKGBUILD | 10 +++++---
squid-r13407.patch | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-06-30 16:18:49 UTC (rev 113802)
+++ PKGBUILD 2014-06-30 16:29:47 UTC (rev 113803)
@@ -6,7 +6,7 @@
pkgname=squid
pkgver=3.4.6
-pkgrel=1
+pkgrel=2
pkgdesc='Full-featured Web proxy cache server'
arch=('x86_64' 'i686')
url='http://www.squid-cache.org'
@@ -24,16 +24,18 @@
'squid.pam'
'squid.cron'
'squid.service'
- 'squid.tmpfiles')
+ 'squid.tmpfiles'
+ 'squid-r13407.patch')
md5sums=('d3ca4ce0a039bbba8258d6b67d6afaa1'
'270977cdd9b47ef44c0c427ab9034777'
'a71425c4951f2e5b640d19e6a5048531'
'ceeb57c69ebb165676219222f109a24e'
- 'd243da117c1aee03c0cc6052f023a380')
+ 'd243da117c1aee03c0cc6052f023a380'
+ '06e107bc303aca86550a9041fb0ab7a8')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
-# patch -p0 <$srcdir/ssl.patch
+ patch -p0 <$srcdir/squid-r13407.patch
}
build() {
Added: squid-r13407.patch
===================================================================
--- squid-r13407.patch (rev 0)
+++ squid-r13407.patch 2014-06-30 16:29:47 UTC (rev 113803)
@@ -0,0 +1,57 @@
+@@ -, +, @@
+ author: Alex Rousskov <rousskov at measurement-factory.com>
+ Avoid on-exit crashes when adaptation is enabled.
+
+ After trunk r13269 (Vector refactor) destroyed vector objects still have
+ positive item counts. This exposes use-after-delete bugs. In this particular
+ case, global adaptation rule/group/service arrays are destructed by global
+ destruction sequence first and then again by Adaptation::*::TheConfig objects
+ destructors.
+
+ This change avoiding static destruction order dependencies by storing those
+ global adaptation arrays on heap.
+--- src/adaptation/AccessRule.cc 2014-06-03 07:05:07 +0000
++++ src/adaptation/AccessRule.cc 2014-06-29 15:22:19 +0000
+@@ -51,10 +51,10 @@ Adaptation::AccessRule::group()
+
+ Adaptation::AccessRules &
+ Adaptation::AllRules()
+ {
+- static AccessRules TheRules;
+- return TheRules;
++ static AccessRules *TheRules = new AccessRules;
++ return *TheRules;
+ }
+
+ // TODO: make AccessRules::find work
+ Adaptation::AccessRule *
+--- src/adaptation/Service.cc 2012-08-28 13:00:30 +0000
++++ src/adaptation/Service.cc 2014-06-29 15:22:19 +0000
+@@ -53,10 +53,10 @@ Adaptation::Service::wants(const Service
+
+ Adaptation::Services &
+ Adaptation::AllServices()
+ {
+- static Services TheServices;
+- return TheServices;
++ static Services *TheServices = new Services;
++ return *TheServices;
+ }
+
+ Adaptation::ServicePointer
+ Adaptation::FindService(const Service::Id& key)
+--- src/adaptation/ServiceGroups.cc 2013-09-28 13:03:58 +0000
++++ src/adaptation/ServiceGroups.cc 2014-06-29 15:22:19 +0000
+@@ -314,10 +314,10 @@ Adaptation::ServicePlan::print(std::ostr
+
+ Adaptation::Groups &
+ Adaptation::AllGroups()
+ {
+- static Groups TheGroups;
+- return TheGroups;
++ static Groups *TheGroups = new Groups;
++ return *TheGroups;
+ }
+
+ Adaptation::ServiceGroupPointer
+ Adaptation::FindGroup(const ServiceGroup::Id &id)
More information about the arch-commits
mailing list