diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2017-08-28 11:26:51 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2017-08-28 11:26:51 +0300 |
commit | 7f2e1f1bb5712a240237819e0bc014790d43520c (patch) | |
tree | c9531b9ec8f27743e8ec348f5b02264c07f6cbc4 /thread_local_alloc.c | |
parent | a451ee7157d487b9fb00c4b33ac42ff4f61f24cf (diff) | |
download | bdwgc-7f2e1f1bb5712a240237819e0bc014790d43520c.tar.gz |
Fix assertion violation in return_single_freelist in child process
Issue #171 (bdwgc).
GC_destroy_thread_local cannot be called from a thread other than
the current one.
* pthread_support.c [CAN_HANDLE_FORK && THREAD_LOCAL_ALLOC]
(GC_remove_all_threads_but_me): Do not call GC_destroy_thread_local;
add comment.
* win32_threads.c [CAN_HANDLE_FORK && THREAD_LOCAL_ALLOC]
(GC_remove_all_threads_but_me): Likewise.
* thread_local_alloc.c [THREAD_LOCAL_ALLOC] (GC_destroy_thread_local):
Update comment.
Diffstat (limited to 'thread_local_alloc.c')
-rw-r--r-- | thread_local_alloc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/thread_local_alloc.c b/thread_local_alloc.c index aacd855e..5608570e 100644 --- a/thread_local_alloc.c +++ b/thread_local_alloc.c @@ -129,8 +129,7 @@ GC_INNER void GC_destroy_thread_local(GC_tlfs p) { int k; - /* We currently only do this from the thread itself or from */ - /* the fork handler for a child process. */ + /* We currently only do this from the thread itself. */ GC_STATIC_ASSERT(THREAD_FREELISTS_KINDS <= MAXOBJKINDS); for (k = 0; k < THREAD_FREELISTS_KINDS; ++k) { if (k == (int)GC_n_kinds) |