From: Mathieu Desnoyers Date: Wed, 18 May 2016 18:50:01 +0000 (-0400) Subject: Fix: urcu-bp: re-initialize list head on library exit X-Git-Tag: v0.8.10~13 X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=commitdiff_plain;h=f4d5fce7d699049e8f1c2cf8c4a56af02b78460a Fix: urcu-bp: re-initialize list head on library exit In case an application would try to create threads after the urcu-bp library destructor has run, make sure the arena chunk list is re-initialized after the memory mappings are unmapped. Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu-bp.c b/urcu-bp.c index 9d6713e..f78935e 100644 --- a/urcu-bp.c +++ b/urcu-bp.c @@ -590,6 +590,7 @@ void _rcu_bp_exit(void) munmap(chunk, chunk->data_len + sizeof(struct registry_chunk)); } + CDS_INIT_LIST_HEAD(®istry_arena.chunk_list); ret = pthread_key_delete(urcu_bp_key); if (ret) abort();