From 7937ae1cd35218d2485f58757a0b9cb910a28e28 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 18 May 2016 14:50:01 -0400 Subject: [PATCH 1/1] 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 --- urcu-bp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/urcu-bp.c b/urcu-bp.c index 22e17cc..cbdebf4 100644 --- a/urcu-bp.c +++ b/urcu-bp.c @@ -612,6 +612,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(); -- 2.34.1