[runtime] Don't make the domain id allocatable before we clear the domain (#4942)
authorVlad Brezae <brezaevlad@gmail.com>
Tue, 30 May 2017 22:28:50 +0000 (01:28 +0300)
committerGitHub <noreply@github.com>
Tue, 30 May 2017 22:28:50 +0000 (01:28 +0300)
commitcef99c3837ddc910404593c4d06ed3890a76cc46
tree43781487bb00fc5cdecf8d11b6142a6a04ad6b17
parentf7e0f70b7d3f6defb1e7ac7fb98f57bfc4722123
[runtime] Don't make the domain id allocatable before we clear the domain (#4942)

Otherwise, while we are clearing the domain, another domain might be created that has the same id as the current one. This would lead to crashes due to releasing of data from the newly created domain (ex gchandles).
mono/metadata/domain.c