SWDEV-330240 - HLK pnp with IO stress test fail
This code change is to improve error handling. This code change does not fix issue itself. Before this code change, hostcallBuffer_ point is initialized in the end of create() function. If create function fails and returns early, hostcallBuffer_ point is not initialized. This non-initialized point can cause access violation when object is destructed. This code change put the initialization of the pointer in the constructor. Change-Id: I7fb6e764eb0547196dca03db237e49d3ff0fd06a
This commit is contained in:
zatwierdzone przez
AlexBin Xie
rodzic
66ecd38af6
commit
5528812aa9
@@ -878,6 +878,9 @@ VirtualGPU::VirtualGPU(Device& device)
|
||||
|
||||
queues_[MainEngine] = nullptr;
|
||||
queues_[SdmaEngine] = nullptr;
|
||||
|
||||
// The hostcall buffer for this vqueue is initialized on demand.
|
||||
hostcallBuffer_ = nullptr;
|
||||
}
|
||||
|
||||
bool VirtualGPU::create(bool profiling, uint deviceQueueSize, uint rtCUs,
|
||||
@@ -1035,9 +1038,6 @@ bool VirtualGPU::create(bool profiling, uint deviceQueueSize, uint rtCUs,
|
||||
&dbg_vmid);
|
||||
}
|
||||
|
||||
// The hostcall buffer for this vqueue is initialized on demand.
|
||||
hostcallBuffer_ = nullptr;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user