Fix static lib crash by setting top init_priority

Set top init_priority on affecting global variables so that
they will be created firstly and destroyed lastly.

Change-Id: Ied59fbecab66ba8195c4a7a02b6bef9fa2fad3af


[ROCm/clr commit: f7bf882981]
Αυτή η υποβολή περιλαμβάνεται σε:
Tao Sang
2020-07-04 23:15:03 -04:00
υποβλήθηκε από Tao Sang
γονέας fa89271aaf
υποβολή 7591ff8172
4 αρχεία άλλαξαν με 12 προσθήκες και 8 διαγραφές
@@ -1430,8 +1430,8 @@ void Image::Format::formatColor(const void* colorRGBA, void* colorFormat) const
}
}
std::map<uintptr_t, uintptr_t> SvmBuffer::Allocated_;
Monitor SvmBuffer::AllocatedLock_("Guards SVM allocation list");
Monitor SvmBuffer::AllocatedLock_ ROCCLR_INIT_PRIORITY(101) ("Guards SVM allocation list");
std::map<uintptr_t, uintptr_t> SvmBuffer::Allocated_ ROCCLR_INIT_PRIORITY(101);
void SvmBuffer::Add(uintptr_t k, uintptr_t v) {
ScopedLock lock(AllocatedLock_);