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
This commit is contained in:
Tao Sang
2020-07-04 23:15:03 -04:00
zatwierdzone przez Tao Sang
rodzic 2c551e44cc
commit f7bf882981
4 zmienionych plików z 12 dodań i 8 usunięć
+2 -2
Wyświetl plik
@@ -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_);