[profiler] Fix several race conditions in accessing MonoProfilerThread.buffer.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Mon, 12 Sep 2016 08:44:34 +0000 (10:44 +0200)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Sun, 2 Oct 2016 16:46:21 +0000 (18:46 +0200)
commit51a03a73134b3b2f1c1d216e306616305814cfec
tree961e6997c92a28a29bc04def01713a7381851ee1
parent4533cd91b27686c4e453323ce90fb432db33a790
[profiler] Fix several race conditions in accessing MonoProfilerThread.buffer.

Only in very few situations is it okay to access this field without first
taking the reader lock or exclusive lock.

Fixes some crashes observed in the profiler stress tests.
mono/profiler/mono-profiler-log.c