[mono] Enter GC Unsafe mode in some string allocation functions (#33754)
authorAleksey Kliger (λgeek) <alklig@microsoft.com>
Thu, 19 Mar 2020 23:00:09 +0000 (19:00 -0400)
committerGitHub <noreply@github.com>
Thu, 19 Mar 2020 23:00:09 +0000 (19:00 -0400)
commit96d90cdffc5187c965f3363b25131fd2a889bd07
tree2b347dd059732204afea919b503028ef7a1913bb
parent5c6a91dc26f812290acd78f42c30f6bcf4d5af4a
[mono] Enter GC Unsafe mode in some string allocation functions (#33754)

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.
src/mono/mono/metadata/object.c