[TSan] Unlock fastpath when checking domains_to_finalize (#5598)
authorArmin Hasitzka <cherusker@users.noreply.github.com>
Wed, 20 Sep 2017 19:51:18 +0000 (21:51 +0200)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Wed, 20 Sep 2017 19:51:18 +0000 (21:51 +0200)
commitc7e322d704332360ffdb32aa18d722b3f93cb8cc
treee63b2d4c40849500bbb4bd63815a550c2ca5a073
parent700b4be883771cecf0ce485246980637805b52dc
[TSan] Unlock fastpath when checking domains_to_finalize (#5598)

[TSan] Unlock fastpath when checking domains_to_finalize

I understand that the affected line is a fastpath which seems absolutely fine to me as it is properly checked later. It is, however, rightfully, detected as a data race by Clang's ThreadSanitizer. I would, therefore, suggest using `UnlockedReadPointer ()` to mark this race as known + accepted.
mono/metadata/gc.c
mono/utils/unlocked.h