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]
This commit is contained in:
@@ -85,8 +85,8 @@ Context* Device::glb_ctx_ = nullptr;
|
||||
Monitor Device::p2p_stage_ops_("P2P Staging Lock", true);
|
||||
Memory* Device::p2p_stage_ = nullptr;
|
||||
|
||||
amd::Monitor MemObjMap::AllocatedLock_("Guards SVM allocation list");
|
||||
std::map<uintptr_t, amd::Memory*> MemObjMap::MemObjMap_;
|
||||
Monitor MemObjMap::AllocatedLock_ ROCCLR_INIT_PRIORITY(101) ("Guards MemObjMap allocation list");
|
||||
std::map<uintptr_t, amd::Memory*> MemObjMap::MemObjMap_ ROCCLR_INIT_PRIORITY(101);
|
||||
|
||||
size_t MemObjMap::size() {
|
||||
amd::ScopedLock lock(AllocatedLock_);
|
||||
|
||||
Reference in New Issue
Block a user