[coop] Make MONO_ENTER_GC_UNSAFE fatal if no_safepoints is set (#32666)
authormonojenkins <jo.shields+jenkins@xamarin.com>
Fri, 20 Mar 2020 14:58:30 +0000 (10:58 -0400)
committerGitHub <noreply@github.com>
Fri, 20 Mar 2020 14:58:30 +0000 (10:58 -0400)
commitb4ef085aed71c9f09722eac1472f533e08adc673
treeac28c6c04367a9b694718eda945f5ba10d69a181
parent02ddac102ddec735cba170ca9803acbd675720cf
[coop] Make MONO_ENTER_GC_UNSAFE fatal if no_safepoints is set (#32666)

Previously it would print a warning, only, because otherwise we would get a
second assert in the same place while the crash machinery would run from the
current thread from the abort in `mono_fatal_with_history`

The solution is to turn off the "no safepoints" bit since we know we're
definitely going to assert here.

Also record the current state in the checked mode state transition history to
make it a bit easier to diagnose where the problem surfaced.

Also fixed up a pair of other debugging/tracing messages so the message strings
accurately reflect the state.

Co-authored-by: lambdageek <lambdageek@users.noreply.github.com>
src/mono/mono/utils/mono-threads-state-machine.c