Skip to content

Commit

Permalink
race condition fix
Browse files Browse the repository at this point in the history
many thanks to Jonathan Protzenko
who detected it on a high-end machine
  • Loading branch information
Antonin Reitz committed Oct 16, 2023
1 parent db25dda commit c4d2cdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib-alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#define N_ARENA 4

static uint32_t init_status = 0UL;
static atomic_uint init_status = 0UL;
static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;

__attribute__((tls_model("initial-exec")))
Expand Down

0 comments on commit c4d2cdd

Please sign in to comment.