]> granicus.if.org Git - gc/commit
Fix data race in make_descriptor when setting explicit_typing_initialized
authorIvan Maidanski <ivmai@mail.ru>
Wed, 29 Nov 2017 17:15:49 +0000 (20:15 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 15 Dec 2017 17:59:40 +0000 (20:59 +0300)
commit7f262e4e9f986d11683c9ed10012e2b13f34625d
tree9bc340ec25cedb4c6f6a31012aa0750b5f4c26ea
parent406ea1a9d28ff06eb2dd639aabe43803536908db
Fix data race in make_descriptor when setting explicit_typing_initialized
(fix commit 5f350a0)

* typd_mlc.c [AO_HAVE_load_acquire] (GC_explicit_typing_initialized):
Add volatile qualifier.
* typd_mlc.c [AO_HAVE_load_acquire] (GC_make_descriptor): Remove
cast of &GC_explicit_typing_initialized; do not check THREADS macro;
fallback to locked checking of GC_explicit_typing_initialized if
AO_HAVE_store_release is not defined; use AO_store_release to set
GC_explicit_typing_initialized (to true).
* typd_mlc.c (GC_make_descriptor): Reformat code dealing with
GC_explicit_typing_initialized (check whether AO_HAVE_load_acquire is
defined only once).
typd_mlc.c