]> 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>
Sun, 17 Dec 2017 08:53:12 +0000 (11:53 +0300)
commitc0492a70e4df186fbded649ddcc012c4c06c639e
treea9a744333012329193ffbe490c949f7c4264cf4b
parent0c7fdf4d9d5993337b7449528f84f8490bf30e2e
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