Add one more candidate for issue fixing
Imported from upstream commit 6eed12605154b8ce10e9be0f51253e6ec318550e
This commit is contained in:
parent
9cfd91a473
commit
d5106d287e
|
@ -0,0 +1,59 @@
|
||||||
|
From 6257d829c9d7e71ac51bcdc6b5b981c7a19200e2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mark Andrews <marka@isc.org>
|
||||||
|
Date: Mon, 25 Nov 2019 05:46:55 +0000
|
||||||
|
Subject: [PATCH] Merge branch
|
||||||
|
'1373-threadsanitizer-data-race-rbtdb-c-5193-in-detachnode' into 'master'
|
||||||
|
|
||||||
|
Resolve "ThreadSanitizer: data race rbtdb.c:5193 in detachnode"
|
||||||
|
|
||||||
|
Closes #1373
|
||||||
|
|
||||||
|
See merge request isc-projects/bind9!2598
|
||||||
|
---
|
||||||
|
lib/dns/include/dns/rbt.h | 22 +++++++++-------------
|
||||||
|
1 file changed, 9 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/dns/include/dns/rbt.h b/lib/dns/include/dns/rbt.h
|
||||||
|
index 67ac3e4d8a..a084bd6193 100644
|
||||||
|
--- a/lib/dns/include/dns/rbt.h
|
||||||
|
+++ b/lib/dns/include/dns/rbt.h
|
||||||
|
@@ -49,10 +49,7 @@ ISC_LANG_BEGINDECLS
|
||||||
|
|
||||||
|
#define DNS_RBT_USEMAGIC 1
|
||||||
|
|
||||||
|
-/*
|
||||||
|
- * These should add up to 30.
|
||||||
|
- */
|
||||||
|
-#define DNS_RBT_LOCKLENGTH 10
|
||||||
|
+#define DNS_RBT_LOCKLENGTH (sizeof(((dns_rbtnode_t *)0)->locknum)*8)
|
||||||
|
#define DNS_RBT_REFLENGTH 20
|
||||||
|
|
||||||
|
#define DNS_RBTNODE_MAGIC ISC_MAGIC('R','B','N','O')
|
||||||
|
@@ -159,16 +156,15 @@ struct dns_rbtnode {
|
||||||
|
* separate region of memory.
|
||||||
|
*/
|
||||||
|
void *data;
|
||||||
|
- unsigned int :0; /* start of bitfields c/o node lock */
|
||||||
|
- unsigned int dirty:1;
|
||||||
|
- unsigned int wild:1;
|
||||||
|
- unsigned int locknum:DNS_RBT_LOCKLENGTH;
|
||||||
|
-#ifndef DNS_RBT_USEISCREFCOUNT
|
||||||
|
- unsigned int references:DNS_RBT_REFLENGTH;
|
||||||
|
-#endif
|
||||||
|
- unsigned int :0; /* end of bitfields c/o node lock */
|
||||||
|
+ uint8_t :0; /* start of bitfields c/o node lock */
|
||||||
|
+ uint8_t dirty:1;
|
||||||
|
+ uint8_t wild:1;
|
||||||
|
+ uint8_t :0; /* end of bitfields c/o node lock */
|
||||||
|
+ uint16_t locknum; /* note that this is not in the bitfield */
|
||||||
|
#ifdef DNS_RBT_USEISCREFCOUNT
|
||||||
|
- isc_refcount_t references; /* note that this is not in the bitfield */
|
||||||
|
+ isc_refcount_t references;
|
||||||
|
+#else
|
||||||
|
+ unsigned int references:DNS_RBT_REFLENGTH;
|
||||||
|
#endif
|
||||||
|
/*@}*/
|
||||||
|
};
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
|
@ -168,6 +168,7 @@ Patch179: bind-9.11-rh1736762-1.patch
|
||||||
Patch180: bind-9.11-rh1736762-2.patch
|
Patch180: bind-9.11-rh1736762-2.patch
|
||||||
Patch181: bind-9.11-rh1736762-3.patch
|
Patch181: bind-9.11-rh1736762-3.patch
|
||||||
Patch182: bind-9.11-rh1736762-4.patch
|
Patch182: bind-9.11-rh1736762-4.patch
|
||||||
|
Patch183: bind-9.11-rh1736762-5.patch
|
||||||
|
|
||||||
# SDB patches
|
# SDB patches
|
||||||
Patch11: bind-9.3.2b2-sdbsrc.patch
|
Patch11: bind-9.3.2b2-sdbsrc.patch
|
||||||
|
@ -577,6 +578,7 @@ are used for building ISC DHCP.
|
||||||
%patch180 -p1 -b .rh1736762-2
|
%patch180 -p1 -b .rh1736762-2
|
||||||
%patch181 -p1 -b .rh1736762-3
|
%patch181 -p1 -b .rh1736762-3
|
||||||
%patch182 -p1 -b .rh1736762-4
|
%patch182 -p1 -b .rh1736762-4
|
||||||
|
%patch183 -p1 -b .rh1736762-5
|
||||||
|
|
||||||
mkdir lib/dns/tests/testdata/dstrandom
|
mkdir lib/dns/tests/testdata/dstrandom
|
||||||
cp -a %{SOURCE50} lib/dns/tests/testdata/dstrandom/random.data
|
cp -a %{SOURCE50} lib/dns/tests/testdata/dstrandom/random.data
|
||||||
|
|
Loading…
Reference in New Issue