summaryrefslogtreecommitdiff
path: root/finalize.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-12-29 23:09:27 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-12-29 23:09:27 +0300
commitb528d5760e1e05c51b341741833a3caba34ea20a (patch)
tree16a0443d1fba769c06216118b1d1c27981a57ebf /finalize.c
parent0a1667bee7f2c004abda6ecd173cd80bfef8412c (diff)
downloadbdwgc-b528d5760e1e05c51b341741833a3caba34ea20a.tar.gz
Ensure GC_StackContext_Rep object allocated in GC_new_thread is marked
(fix of commit 7eb49a4e6) Issue #362 (bdwgc). The current stack is not scanned until the thread is registered, thus crtn pointer (to a newly allocated GC_StackContext_Rep object) is to be retained in the global data roots for a while (and pushed explicitly if a collection occurs during GC_Thread_Rep object allocation). * pthread_support.c (saved_crtn): New static variable. * pthread_support.c (GC_push_thread_structures): Push saved_crtn symbol. * pthread_support.c (GC_new_thread): Store crtn to saved_crtn before allocation of GC_thread object and set saved_crtn back to null after the allocation; add comment.
Diffstat (limited to 'finalize.c')
0 files changed, 0 insertions, 0 deletions