From b3d1ac7232f9b50cbbbe3f75c123b6e8777de7ff Mon Sep 17 00:00:00 2001 From: "Haehnle, Nicolai" Date: Thu, 10 Apr 2025 11:40:05 -0700 Subject: [PATCH] Report null stream creation failure (#152) Explicitly nulling the pointer causes us to report the error below instead of keeping a dangling pointer around that will most likely lead to a subsequent segfault. [ROCm/clr commit: 199b0f1086a125717c8cdbf9dc57bf3fe008268c] --- projects/clr/hipamd/src/hip_device.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/clr/hipamd/src/hip_device.cpp b/projects/clr/hipamd/src/hip_device.cpp index c175b1f3e8..e2a8ff0098 100644 --- a/projects/clr/hipamd/src/hip_device.cpp +++ b/projects/clr/hipamd/src/hip_device.cpp @@ -39,6 +39,7 @@ hip::Stream* Device::NullStream(bool wait) { // Stream creation might be failed from rcor and in that case, vdev is null. if (null_stream_->vdev() == nullptr) { Stream::Destroy(null_stream_); + null_stream_ = nullptr; } } }