Enhance PAL initialization order (#34308)
authorJan Vorlicek <janvorli@microsoft.com>
Thu, 2 Apr 2020 10:37:58 +0000 (12:37 +0200)
committerGitHub <noreply@github.com>
Thu, 2 Apr 2020 10:37:58 +0000 (12:37 +0200)
commit2b0937523254bbf0fdfcb2726492c4396eeaaa14
tree9b91e9bc072632c0f2cbf873cb8feb5d5cd941f1
parentba80c1df68a9ac4887a2ea81a6a20ecdc821d148
Enhance PAL initialization order (#34308)

* Enhance PAL initialization order

The CGroups initialization has _ASSERTE that is not asserting because
debugging support was being initialized after the CGroups initialization.

This change moves the debugging support initialization to the earliest
possible point. It also modifies it so that it doesn't depend on the
PAL env functions and uses getenv instead. And finally, initialization
of the critical section for debug printf is moved to the very end
of DBG_init_channels just as a little cleanup.
src/coreclr/src/pal/src/init/pal.cpp
src/coreclr/src/pal/src/misc/dbgmsg.cpp