mirror of
https://github.com/isc-projects/bind9.git
synced 2026-07-16 02:22:54 -04:00
[9.20] fix: dev: Only update the global tid_count once
Skip updating the `tid_count` value on repeated calls to prevent ThreadSanitizer 'data race'. Backport of MR !12186 Merge branch 'backport-ondrej/skip-repeated-tid_count-update-9.20' into 'bind-9.20' See merge request isc-projects/bind9!12188
This commit is contained in:
commit
746d9bfd3a
1 changed files with 3 additions and 2 deletions
|
|
@ -11,7 +11,6 @@
|
|||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
|
@ -44,7 +43,9 @@ isc__tid_init(uint32_t tid) {
|
|||
void
|
||||
isc__tid_initcount(uint32_t count) {
|
||||
REQUIRE(tid_count == 0 || tid_count == count);
|
||||
tid_count = count;
|
||||
if (tid_count == 0) {
|
||||
tid_count = count;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue