SWDEV-450361 - Add nullptr validation for waitStream
- Application is passing null for parameter stream in API hipStreamWaitEvent
- When event stream isn't capturing and event is not recorded, causes segfault because we are accessing deviceId() from waitStream
Change-Id: I8b87ffd6f234677f68b66dcb7ef44b2ff04a7c91
[ROCm/clr commit: 880f1f0049]
Этот коммит содержится в:
коммит произвёл
Rakesh Roy
родитель
e89ea8577d
Коммит
9630492a1d
@@ -463,7 +463,7 @@ hipError_t hipStreamWaitEvent_common(hipStream_t stream, hipEvent_t event, unsig
|
||||
// If stream is capturing but event is not recorded on event's stream.
|
||||
return hipErrorStreamCaptureIsolation;
|
||||
}
|
||||
if (eventStream->DeviceId() == waitStream->DeviceId()) {
|
||||
if ((waitStream != nullptr) && (eventStream->DeviceId() == waitStream->DeviceId())) {
|
||||
eventStream->GetDevice()->AddSafeStream(eventStream, waitStream);
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user