[mono] Enter GC Unsafe mode in some string allocation functions (#19261)
commit2a11ec66872b91872852dbb43be443beed8c0588
authormonojenkins <jo.shields+jenkins@xamarin.com>
Thu, 19 Mar 2020 23:00:26 +0000 (19 19:00 -0400)
committerGitHub <noreply@github.com>
Thu, 19 Mar 2020 23:00:26 +0000 (19 19:00 -0400)
tree4d3f378d29d3f1a2571faa0b4715805e35613ef3
parentd1362b026e59635f38bc0e42afb4d5ae7fea6d36
[mono] Enter GC Unsafe mode in some string allocation functions (#19261)

All these functions are MONO_RT_EXTERNAL_ONLY and they all allocate managed
objects.

Fixes a coop state machine assertion if an embedder calls the function and it needs to take the GC
lock to do a collection.

Co-authored-by: lambdageek <lambdageek@users.noreply.github.com>
mono/metadata/object.c