2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Move the isc_random API initialization to the thread_local variable

Instead of writing complicated wrappers for every thread, move the
initialization back to isc_random unit and check whether the random seed
was initialized with a thread_local variable.

Ensure that isc_entropy_get() returns a non-zero seed.

This avoids problems with thread sanitizer tests getting stuck in an
infinite loop.
This commit is contained in:
Ondřej Surý
2023-04-25 08:53:57 +02:00
parent e0248bf60f
commit 65021dbf52
6 changed files with 21 additions and 46 deletions

View File

@@ -42,7 +42,6 @@
#include "async_p.h"
#include "job_p.h"
#include "loop_p.h"
#include "random_p.h"
/**
* Private